Skip to content

Commit

Permalink
Add test_generate_env_name_uses_real_path() unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgreg committed Aug 4, 2022
1 parent fb6764a commit 1d4321a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/utils/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -1362,6 +1362,13 @@ def test_generate_env_name_ignores_case_for_case_insensitive_fs(tmp_dir: str):
assert venv_name1 != venv_name2


def test_generate_env_name_uses_real_path(tmp_dir: str, mocker: MockerFixture):
mocker.patch("os.path.realpath", return_value="the_real_dir")
venv_name1 = EnvManager.generate_env_name("simple-project", "the_real_dir")
venv_name2 = EnvManager.generate_env_name("simple-project", "linked_dir")
assert venv_name1 == venv_name2


@pytest.fixture()
def extended_without_setup_poetry() -> Poetry:
poetry = Factory().create_poetry(
Expand Down

0 comments on commit 1d4321a

Please sign in to comment.