diff options
author | Ralf Gommers <ralf.gommers@gmail.com> | 2019-08-10 21:45:04 -0700 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@gmail.com> | 2019-08-20 14:56:25 -0700 |
commit | 6c8ba943c5a5557414546a4d49d9c894133acf02 (patch) | |
tree | cf6f4177f0f77b72570c69d7aa4ca10af35a292f /numpy/distutils/tests | |
parent | 950dd4e15ea0976bb671148440e036c3ae2dc11d (diff) | |
download | numpy-6c8ba943c5a5557414546a4d49d9c894133acf02.tar.gz |
BLD: MAINT: change default behavior of build flag appending.
This is a follow-up to gh-7427. This can lead to hard to understand
build failures, and we've warned that this change was coming for two
releases.
Diffstat (limited to 'numpy/distutils/tests')
-rw-r--r-- | numpy/distutils/tests/test_fcompiler.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/numpy/distutils/tests/test_fcompiler.py b/numpy/distutils/tests/test_fcompiler.py index ba19a97ea..6d245fbd4 100644 --- a/numpy/distutils/tests/test_fcompiler.py +++ b/numpy/distutils/tests/test_fcompiler.py @@ -45,37 +45,3 @@ def test_fcompiler_flags(monkeypatch): else: assert_(new_flags == prev_flags + [new_flag]) - -def test_fcompiler_flags_append_warning(monkeypatch): - # Test to check that the warning for append behavior changing in future - # is triggered. Need to use a real compiler instance so that we have - # non-empty flags to start with (otherwise the "if var and append" check - # will always be false). - try: - with suppress_warnings() as sup: - sup.record() - fc = numpy.distutils.fcompiler.new_fcompiler(compiler='gnu95') - fc.customize() - except numpy.distutils.fcompiler.CompilerNotFound: - pytest.skip("gfortran not found, so can't execute this test") - - # Ensure NPY_DISTUTILS_APPEND_FLAGS not defined - monkeypatch.delenv('NPY_DISTUTILS_APPEND_FLAGS', raising=False) - - for opt, envvar in customizable_flags: - new_flag = '-dummy-{}-flag'.format(opt) - with suppress_warnings() as sup: - sup.record() - prev_flags = getattr(fc.flag_vars, opt) - - monkeypatch.setenv(envvar, new_flag) - with suppress_warnings() as sup: - sup.record() - new_flags = getattr(fc.flag_vars, opt) - if prev_flags: - # Check that warning was issued - assert len(sup.log) == 1 - - monkeypatch.delenv(envvar) - assert_(new_flags == [new_flag]) - |