From 32478b26a9901105a7dab03dd74d03f940fa1fb5 Mon Sep 17 00:00:00 2001 From: gph82 Date: Fri, 18 Oct 2024 17:57:34 +0200 Subject: [PATCH] [test_examples.Test_fetch_example_data.test_alias_unzip_to_otherfile] sort output of os.listdir before checking --- tests/test_examples.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_examples.py b/tests/test_examples.py index 6818e7a5..7028ddf5 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -206,11 +206,11 @@ def test_alias_unzip_to_otherfile(self): unzip="unzip_here") assert os.path.exists(local_path) # assert os.path.exists((os.path.splitext(local_path))[0]) - files = os.listdir(td) + files = sorted(os.listdir(td)) assert len(files) == 2 - assert files[0] == "unzip_here.zip" - assert files[1] == "unzip_here" - extracted = sorted(os.listdir(files[1])) + assert files[0] == "unzip_here" + assert files[1] == "unzip_here.zip" + extracted = sorted(os.listdir(files[0])) assert extracted[0] == "A.dat" assert extracted[1] == "B.dat"