From 6e01373d0b3b75ecd4534e7f928acf009f7b8c8f Mon Sep 17 00:00:00 2001 From: Andrew Lawson Date: Thu, 19 Oct 2017 16:48:27 +0100 Subject: ENH: Added compatability for the NAG Fortran compiler, nagfor --- numpy/distutils/tests/test_fcompiler_nagfor.py | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 numpy/distutils/tests/test_fcompiler_nagfor.py (limited to 'numpy/distutils/tests') 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() -- cgit v1.2.1