summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-04-21 14:10:50 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-04-21 14:10:50 (GMT)
commit3927d802b672b8d86c1dfeda127b17edb581c798 (patch)
tree7159d4db2b9a045ddd37ddf07f948cde7030014c /Lib
parent4fe2184a0fa1e4ab2b93aa4097b72cad7bdf1549 (diff)
parent4140fb52114541f52a047cb36205c79de0258ade (diff)
downloadcpython-3927d802b672b8d86c1dfeda127b17edb581c798.zip
cpython-3927d802b672b8d86c1dfeda127b17edb581c798.tar.gz
cpython-3927d802b672b8d86c1dfeda127b17edb581c798.tar.bz2
Merge #17065: Use process-unique key for winreg test.
Patch by Jeremy Kloth.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_winreg.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_winreg.py b/Lib/test/test_winreg.py
index a8454a0..38e76aa 100644
--- a/Lib/test/test_winreg.py
+++ b/Lib/test/test_winreg.py
@@ -28,9 +28,12 @@ WIN64_MACHINE = True if machine() == "AMD64" else False
# tests are only valid up until 6.1
HAS_REFLECTION = True if WIN_VER < (6, 1) else False
-test_key_name = "SOFTWARE\\Python Registry Test Key - Delete Me"
+# Use a per-process key to prevent concurrent test runs (buildbot!) from
+# stomping on each other.
+test_key_base = "Python Test Key [%d] - Delete Me" % (os.getpid(),)
+test_key_name = "SOFTWARE\\" + test_key_base
# On OS'es that support reflection we should test with a reflected key
-test_reflect_key_name = "SOFTWARE\\Classes\\Python Test Key - Delete Me"
+test_reflect_key_name = "SOFTWARE\\Classes\\" + test_key_base
test_data = [
("Int Value", 45, REG_DWORD),