diff options
author | Andrew Lawson <andrewl@olney.nag.co.uk> | 2017-10-19 16:48:27 +0100 |
---|---|---|
committer | Andrew Lawson <andrewl@olney.nag.co.uk> | 2017-10-19 16:48:27 +0100 |
commit | 6e01373d0b3b75ecd4534e7f928acf009f7b8c8f (patch) | |
tree | 60397ffcec20437828b1b9bc78507e58abbf12eb /numpy/distutils/tests | |
parent | e9c85baf072f81b2a2e47e07b4d4e121ddbfb669 (diff) | |
download | numpy-6e01373d0b3b75ecd4534e7f928acf009f7b8c8f.tar.gz |
ENH: Added compatability for the NAG Fortran compiler, nagfor
Diffstat (limited to 'numpy/distutils/tests')
-rw-r--r-- | numpy/distutils/tests/test_fcompiler_nagfor.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/numpy/distutils/tests/test_fcompiler_nagfor.py b/numpy/distutils/tests/test_fcompiler_nagfor.py new file mode 100644 index 000000000..461aee6c0 --- /dev/null +++ b/numpy/distutils/tests/test_fcompiler_nagfor.py @@ -0,0 +1,27 @@ +from __future__ import division, absolute_import, print_function + +from numpy.testing import assert_, run_module_suite + +import numpy.distutils.fcompiler + +nagfor_version_strings = [('NAG Fortran Compiler Release 6.2(Chiyoda) Build 6200', '6.2')] + +nag_version_strings = [('NAGWare Fortran 95 compiler Release 5.1(347,355-367,375,' + '380-383,389,394,399,401-402,407,431,435,437,446,459-460,' + '463,472,494,496,503,508,511,517,529,555,557,565)', '5.1')] + +class TestNagFCompilerVersions(object): + def test_version_match(self): + fc = numpy.distutils.fcompiler.new_fcompiler(compiler='nagfor') + for vs, version in nagfor_version_strings: + v = fc.version_match(vs) + assert_(v == version) + + fc = numpy.distutils.fcompiler.new_fcompiler(compiler='nag') + for vs, version in nag_version_strings: + v = fc.version_match(vs) + assert_(v == version) + + +if __name__ == '__main__': + run_module_suite() |