Skip to content

Commit 8e6463b

Browse files
Try to ensure fakeness of filesystem.
1 parent 6647b65 commit 8e6463b

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

tests/unit_tests/steps/test_compile_fortran.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from pytest import fixture, mark, raises
77
from pytest_subprocess.fake_process import FakeProcess
8+
from pyfakefs.fake_filesystem import FakeFilesystem
89

910
from fab.artefacts import ArtefactSet, ArtefactStore
1011
from fab.build_config import BuildConfig, FlagsConfig
@@ -169,7 +170,7 @@ def test_vanilla(self):
169170

170171
# This avoids pylint warnings about Redefining names from outer scope
171172
@fixture(scope='function')
172-
def content(stub_tool_box):
173+
def content(stub_tool_box, fs: FakeFilesystem):
173174
flags = ['flag1', 'flag2']
174175
flags_config = Mock()
175176
flags_config.flags_for_path.return_value = flags
@@ -192,7 +193,8 @@ def content(stub_tool_box):
192193

193194
class TestProcessFile:
194195
def test_without_prebuild(self, content,
195-
fake_process: FakeProcess, fs) -> None:
196+
fake_process: FakeProcess,
197+
fs: FakeFilesystem) -> None:
196198
"""
197199
Tests compile when prebuids are not present.
198200
"""
@@ -235,7 +237,8 @@ def test_without_prebuild(self, content,
235237
}
236238

237239
def test_with_prebuild(self, content,
238-
fs, fake_process: FakeProcess) -> None:
240+
fs: FakeFilesystem,
241+
fake_process: FakeProcess) -> None:
239242
"""
240243
Tests compilation only if prebuidlds are not present.
241244
"""

0 commit comments

Comments
 (0)