Skip to content

Commit

Permalink
Sort the result of iterdir to ensure consistency in test
Browse files Browse the repository at this point in the history
  • Loading branch information
maresb committed Oct 20, 2024
1 parent dd7cf5b commit 36b2049
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/cli/env/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -1560,13 +1560,11 @@ def update(self, metadata):
storage_path = storage_dirs[0]
assert len(storage_path.name) == 8

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

env_path = env_dirs[1]

assert env_path.name == 'test'

with UVVirtualEnv(env_path, platform):
output = platform.run_command([uv_on_path, 'pip', 'freeze'], check=True, capture_output=True).stdout.decode(
'utf-8'
Expand Down

0 comments on commit 36b2049

Please sign in to comment.