diff options
| author | Cheryl Sabella <cheryl.sabella@gmail.com> | 2019-03-08 22:01:27 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-08 22:01:27 (GMT) |
| commit | d5a70c6b0355f247931f6be80b78a0ff1869c56f (patch) | |
| tree | a5c246fcebea6663773635616ab2523503b56535 /Lib/test/test_venv.py | |
| parent | 2aab5d310ca752912d5e2f79658edb6684f928c7 (diff) | |
| download | cpython-d5a70c6b0355f247931f6be80b78a0ff1869c56f.zip cpython-d5a70c6b0355f247931f6be80b78a0ff1869c56f.tar.gz cpython-d5a70c6b0355f247931f6be80b78a0ff1869c56f.tar.bz2 | |
bpo-35661: Store the venv prompt in pyvenv.cfg (GH-11440)
Diffstat (limited to 'Lib/test/test_venv.py')
| -rw-r--r-- | Lib/test/test_venv.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py index 347544a..1ddec72 100644 --- a/Lib/test/test_venv.py +++ b/Lib/test/test_venv.py @@ -113,10 +113,16 @@ class BasicTest(BaseTest): builder = venv.EnvBuilder() context = builder.ensure_directories(self.env_dir) self.assertEqual(context.prompt, '(%s) ' % env_name) + builder.create(self.env_dir) + data = self.get_text_file_contents('pyvenv.cfg') + self.assertNotIn("prompt = ", data) builder = venv.EnvBuilder(prompt='My prompt') context = builder.ensure_directories(self.env_dir) self.assertEqual(context.prompt, '(My prompt) ') + builder.create(self.env_dir) + data = self.get_text_file_contents('pyvenv.cfg') + self.assertIn("prompt = 'My prompt'\n", data) @skipInVenv def test_prefixes(self): |
