diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2021-01-01 17:16:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-01 17:16:42 -0700 |
commit | d4f7d9e215773e979eb43a1e5a3cbb51f96bd09d (patch) | |
tree | 92fda133501bd834f7b73bc6ee728271f91cd6c1 | |
parent | 31647f1b3e56c2f2a471cd2c3a583311534173f8 (diff) | |
parent | 2432ea3cbff7b467e9b948f893cca4111c8417c7 (diff) | |
download | numpy-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.py | 4 |
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() |