diff options
| author | Ruairidh MacLeod <ruairidh@rkm.dev> | 2021-10-23 11:16:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-23 11:16:41 +0100 |
| commit | 6bfc29e1a3d621e3f622a0d0395ff261ce0f3973 (patch) | |
| tree | e291a741d83dcdab7a114a1f58da6b1ed9229044 /tests/unit | |
| parent | 4188ac6e72d3b731595c83d46d1c0eb76fe4f6eb (diff) | |
| download | virtualenv-6bfc29e1a3d621e3f622a0d0395ff261ce0f3973.tar.gz | |
special-case `--prompt .` to the cwd (#2220)
Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
Diffstat (limited to 'tests/unit')
| -rw-r--r-- | tests/unit/activation/test_activator.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/unit/activation/test_activator.py b/tests/unit/activation/test_activator.py new file mode 100644 index 0000000..4a8a51c --- /dev/null +++ b/tests/unit/activation/test_activator.py @@ -0,0 +1,18 @@ +from __future__ import absolute_import, unicode_literals + +from argparse import Namespace + +from virtualenv.activation.activator import Activator + + +def test_activator_prompt_cwd(monkeypatch, tmp_path): + class FakeActivator(Activator): + def generate(self, creator): + raise NotImplementedError + + cwd = tmp_path / "magic" + cwd.mkdir() + monkeypatch.chdir(cwd) + + activator = FakeActivator(Namespace(prompt=".")) + assert activator.flag_prompt == "magic" |
