Skip to content

Commit 9650a1d

Browse files
authored
Fix failing test due to unsorted iterdir (#1761)
1 parent c70a178 commit 9650a1d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/cli/env/test_create.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,13 +1560,11 @@ def update(self, metadata):
15601560
storage_path = storage_dirs[0]
15611561
assert len(storage_path.name) == 8
15621562

1563-
env_dirs = list(storage_path.iterdir())
1564-
assert len(env_dirs) == 2
1563+
env_dirs = sorted(storage_path.iterdir())
1564+
assert [d.name for d in env_dirs] == ['hatch-build', 'test']
15651565

15661566
env_path = env_dirs[1]
15671567

1568-
assert env_path.name == 'test'
1569-
15701568
with UVVirtualEnv(env_path, platform):
15711569
output = platform.run_command([uv_on_path, 'pip', 'freeze'], check=True, capture_output=True).stdout.decode(
15721570
'utf-8'

0 commit comments

Comments
 (0)