summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2021-01-01 17:16:42 -0700
committerGitHub <noreply@github.com>2021-01-01 17:16:42 -0700
commitd4f7d9e215773e979eb43a1e5a3cbb51f96bd09d (patch)
tree92fda133501bd834f7b73bc6ee728271f91cd6c1
parent31647f1b3e56c2f2a471cd2c3a583311534173f8 (diff)
parent2432ea3cbff7b467e9b948f893cca4111c8417c7 (diff)
downloadnumpy-d4f7d9e215773e979eb43a1e5a3cbb51f96bd09d.tar.gz
Merge pull request #18103 from DWesl/avoid-changing-odd-tempfile-names
TST: Avoid changing odd tempfile names in tests' site.cfg
-rw-r--r--numpy/distutils/tests/test_system_info.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/distutils/tests/test_system_info.py b/numpy/distutils/tests/test_system_info.py
index ec15126f7..b722281ad 100644
--- a/numpy/distutils/tests/test_system_info.py
+++ b/numpy/distutils/tests/test_system_info.py
@@ -269,7 +269,7 @@ class TestSystemInfoReading:
# But if we copy the values to a '[mkl]' section the value
# is correct
with open(cfg, 'r') as fid:
- mkl = fid.read().replace('ALL', 'mkl')
+ mkl = fid.read().replace('[ALL]', '[mkl]', 1)
with open(cfg, 'w') as fid:
fid.write(mkl)
info = mkl_info()
@@ -277,7 +277,7 @@ class TestSystemInfoReading:
# Also, the values will be taken from a section named '[DEFAULT]'
with open(cfg, 'r') as fid:
- dflt = fid.read().replace('mkl', 'DEFAULT')
+ dflt = fid.read().replace('[mkl]', '[DEFAULT]', 1)
with open(cfg, 'w') as fid:
fid.write(dflt)
info = mkl_info()