test_fcompiler_nagfor.py 1.1 KB

123456789101112131415161718192021222324
  1. from __future__ import division, absolute_import, print_function
  2. from numpy.testing import assert_
  3. import numpy.distutils.fcompiler
  4. nag_version_strings = [('nagfor', 'NAG Fortran Compiler Release '
  5. '6.2(Chiyoda) Build 6200', '6.2'),
  6. ('nagfor', 'NAG Fortran Compiler Release '
  7. '6.1(Tozai) Build 6136', '6.1'),
  8. ('nagfor', 'NAG Fortran Compiler Release '
  9. '6.0(Hibiya) Build 1021', '6.0'),
  10. ('nagfor', 'NAG Fortran Compiler Release '
  11. '5.3.2(971)', '5.3.2'),
  12. ('nag', 'NAGWare Fortran 95 compiler Release 5.1'
  13. '(347,355-367,375,380-383,389,394,399,401-402,407,'
  14. '431,435,437,446,459-460,463,472,494,496,503,508,'
  15. '511,517,529,555,557,565)', '5.1')]
  16. class TestNagFCompilerVersions(object):
  17. def test_version_match(self):
  18. for comp, vs, version in nag_version_strings:
  19. fc = numpy.distutils.fcompiler.new_fcompiler(compiler=comp)
  20. v = fc.version_match(vs)
  21. assert_(v == version)