test_fcompiler_nagfor.py 1.1 KB

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