summaryrefslogtreecommitdiff
path: root/Lib/test/test_venv.py
diff options
context:
space:
mode:
authorCheryl Sabella <cheryl.sabella@gmail.com>2019-03-08 17:01:27 -0500
committerGitHub <noreply@github.com>2019-03-08 17:01:27 -0500
commitd5a70c6b0355f247931f6be80b78a0ff1869c56f (patch)
treea5c246fcebea6663773635616ab2523503b56535 /Lib/test/test_venv.py
parent2aab5d310ca752912d5e2f79658edb6684f928c7 (diff)
downloadcpython-git-d5a70c6b0355f247931f6be80b78a0ff1869c56f.tar.gz
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.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index 347544a677..1ddec72927 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):