Skip to content

Commit

Permalink
explicitly sort filenames
Browse files Browse the repository at this point in the history
to deal with inconsistent default file ordering on different OS's
  • Loading branch information
MinchinWeb committed Apr 7, 2020
1 parent c6fdfaa commit 0ad76eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions features/steps/export_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ def create_directory(context, dir_name):
def assert_dir_contains_files(context, dir_name, expected_files_json_list):
actual_files = os.listdir(dir_name)
expected_files = json.loads(expected_files_json_list)

# sort to deal with inconsistent default file ordering on different OS's
actual_files.sort()
expected_files.sort()

assert actual_files == expected_files, [actual_files, expected_files]


Expand Down

0 comments on commit 0ad76eb

Please sign in to comment.