diff --git a/jaraco/envs.py b/jaraco/envs.py index e8f972e..92707ea 100644 --- a/jaraco/envs.py +++ b/jaraco/envs.py @@ -13,16 +13,16 @@ class VirtualEnv: >>> root = getfixture('tmp_path') >>> mp.setenv('SERVICES_ROOT', str(root)) - Subclass VirtualEnv and supply name and req: + Subclass VirtualEnv and supply req: >>> class MyVirtualEnv(VirtualEnv): - ... name = '.venv' ... req = 'example' >>> env = MyVirtualEnv().create() """ root = Path(os.environ.get('SERVICES_ROOT', '.cache/services')) clean_opts = ["--no-setuptools", "--no-pip", "--no-wheel"] + name = '.venv' @property def dir(self): diff --git a/newsfragments/+d462d589.feature.rst b/newsfragments/+d462d589.feature.rst new file mode 100644 index 0000000..7d0ec49 --- /dev/null +++ b/newsfragments/+d462d589.feature.rst @@ -0,0 +1 @@ +Environments now have a default name, '.venv'. \ No newline at end of file diff --git a/tests/test_envs.py b/tests/test_envs.py index 7a682c3..21b7ba2 100644 --- a/tests/test_envs.py +++ b/tests/test_envs.py @@ -17,9 +17,7 @@ @path_types def test_root_pathlib(tmp_path, VEnvCls, PathCls): venv = VEnvCls() - vars(venv).update( - root=PathCls(tmp_path), name=".venv", create_opts=VEnvCls.clean_opts - ) + vars(venv).update(root=PathCls(tmp_path), create_opts=VEnvCls.clean_opts) venv.ensure_env() possible_bin_dirs = (tmp_path / ".venv/bin", tmp_path / ".venv/Scripts")