Skip to content

Commit

Permalink
Fixed typo in test.
Browse files Browse the repository at this point in the history
  • Loading branch information
hiker committed Aug 9, 2024
1 parent 5c6f99f commit c1eb158
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions tests/unit_tests/tools/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

import pytest

from fab.tools import (Category, CCompiler, FortranCompiler, Gcc, Gfortran, Icc,
Ifort)
from fab.tools import (Category, CCompiler, FortranCompiler, Gcc, Gfortran,
Icc, Ifort)


def test_compiler():
Expand All @@ -26,23 +26,19 @@ def test_compiler():
assert cc._output_flag == "-o"
assert cc.flags == []
assert cc.suite == "gnu"
with pytest.raises(NotImplementedError) as err:
cc.parse_version_output(Category.FORTRAN_COMPILER, "NOT NEEDED")
assert ("The method `parse_version_output` must be provided using a mixin."
in str(err.value))

fc = FortranCompiler("gfortran", "gfortran", "gnu", "-J")
assert fc._compile_flag == "-c"
assert fc._output_flag == "-o"
assert fc.category == Category.FORTRAN_COMPILER
assert fc.suite == "gnu"
assert fc.flags == []

with pytest.raises(NotImplementedError) as err:
fc.parse_version_output(Category.FORTRAN_COMPILER, "NOT NEEDED")

assert ("The method `parse_version_output` must be provided using a mixin."
in str(err.value))

with pytest.raises(NotImplementedError) as err:
fc.parse_version_output(Category.FORTRAN_COMPILER, "NOT NEEDED")

assert ("The method `parse_version_output` must be provided using a mixin."
in str(err.value))

Expand Down

0 comments on commit c1eb158

Please sign in to comment.