Skip to content

Commit

Permalink
make find_all_paths test deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
rpmcginty committed Jan 31, 2024
1 parent e64491a commit d55d8e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/aibs_informatics_core/utils/test_os_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test__find_all_paths__returns_folders_and_files(self):
expected = [str(p) for p in expected]

actual = find_all_paths(root, include_dirs=True, include_files=True)
self.assertListEqual(actual, expected)
self.assertListEqual(sorted(actual), sorted(expected))

def test__find_all_paths__returns_folders_or_files(self):
root = self.tmp_path()
Expand All @@ -59,8 +59,8 @@ def test__find_all_paths__returns_folders_or_files(self):
]
actual_dirs = find_all_paths(root, include_dirs=True, include_files=False)
actual_files = find_all_paths(root, include_dirs=False, include_files=True)
self.assertListEqual(actual_dirs, [str(p) for p in expected_dirs])
self.assertListEqual(actual_files, [str(p) for p in expected_files])
self.assertListEqual(sorted(actual_dirs), sorted([str(p) for p in expected_dirs]))
self.assertListEqual(sorted(actual_files), sorted([str(p) for p in expected_files]))

def test__expandvars__expands_env_vars_without_brackets(self):
self.set_env_vars(("V1", "signal"), ("V2", "the"))
Expand Down

0 comments on commit d55d8e6

Please sign in to comment.