mirror of https://github.com/mamba-org/mamba.git
Remove duplicate random_string from umamba tests
This commit is contained in:
parent
6893ceaa33
commit
8a31b22905
|
@ -1,8 +1,5 @@
|
|||
import os
|
||||
import pathlib
|
||||
import random
|
||||
import shutil
|
||||
import string
|
||||
from typing import Generator
|
||||
|
||||
import pytest
|
||||
|
@ -78,12 +75,9 @@ def tmp_clean_env(
|
|||
os.environ.update(saved_environ)
|
||||
|
||||
|
||||
def random_str(n: int = 10) -> str:
|
||||
"""Return random characters and digits."""
|
||||
return "".join(random.choices(string.ascii_uppercase + string.digits, k=n))
|
||||
|
||||
|
||||
@pytest.fixture(params=[random_str, "some ™∞¢3 spaces §∞©ƒ√≈ç", "long_prefix_" * 20])
|
||||
@pytest.fixture(
|
||||
params=[helpers.random_string, "some ™∞¢3 spaces §∞©ƒ√≈ç", "long_prefix_" * 20]
|
||||
)
|
||||
def tmp_env_name(request) -> str:
|
||||
"""Return the explicit or implicit parametrization."""
|
||||
if callable(request.param):
|
||||
|
|
|
@ -67,8 +67,9 @@ def get_umamba(cwd=os.getcwd()):
|
|||
return umamba
|
||||
|
||||
|
||||
def random_string(N=10):
|
||||
return "".join(random.choices(string.ascii_uppercase + string.digits, k=N))
|
||||
def random_string(n: int = 10) -> str:
|
||||
"""Return random characters and digits."""
|
||||
return "".join(random.choices(string.ascii_uppercase + string.digits, k=n))
|
||||
|
||||
|
||||
def shell(*args, cwd=os.getcwd()):
|
||||
|
|
Loading…
Reference in New Issue