Speed up tests (a bit) (#2776)

Make independent long path test
This commit is contained in:
Antoine Prouvost 2023-08-24 14:47:50 +02:00 committed by GitHub
parent d87924b8ff
commit 41bc4ee5f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -154,7 +154,7 @@ def tmp_root_prefix(
# os.environ restored by tmp_clean_env and tmp_environ
@pytest.fixture(params=[helpers.random_string, "long_prefix_" * 20])
@pytest.fixture(params=[helpers.random_string])
def tmp_env_name(request) -> str:
"""Return the explicit or implicit parametrization."""
if callable(request.param):

View File

@ -887,3 +887,9 @@ def test_pre_commit_compat(tmp_home, tmp_root_prefix, tmp_path):
if pre_commit_log.exists():
print(pre_commit_log.read_text())
raise
def test_long_path_support(tmp_home, tmp_root_prefix):
"""Create an environment with a long name."""
res = helpers.create("-n", "long_prefix_" * 20, "--json")
assert res["success"]