File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -21,18 +21,15 @@ def assert_value_equality(results, expected_values):
21
21
def assert_full_path_equality (results , expected_full_paths ):
22
22
"""Assert equality between two objects.
23
23
24
- *results* must be a list of results as returned by `.find()` methods.
24
+ *results* must be a list or set of results as returned by `.find()` methods.
25
25
26
26
If *expected_full_paths* is a list, then path equality and ordering will be checked.
27
27
If *expected_full_paths* is a set, then path equality and length will be checked.
28
- Otherwise, the full path of the result will be compared to the expected full path.
29
28
"""
30
29
31
30
full_paths = [str (result .full_path ) for result in results ]
32
31
if isinstance (expected_full_paths , list ):
33
32
assert full_paths == expected_full_paths , full_paths
34
- elif isinstance (expected_full_paths , set ):
33
+ else : # isinstance(expected_full_paths, set):
35
34
assert len (full_paths ) == len (expected_full_paths )
36
35
assert set (full_paths ) == expected_full_paths
37
- else :
38
- assert str (results .full_path ) == expected_full_paths
You can’t perform that action at this time.
0 commit comments