Skip to content

Commit 5f59b09

Browse files
committed
Move test to pytest plugin tests where it belongs
- test needs installed pyfakefs - shall fix #687
1 parent a41a03d commit 5f59b09

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

pyfakefs/pytest_tests/pytest_plugin_test.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import os
33
import tempfile
44

5+
import pytest
6+
57
from pyfakefs.fake_filesystem_unittest import Pause
68

79

@@ -50,3 +52,13 @@ def test_pause_resume_contextmanager(fs):
5052
assert os.path.exists(real_temp_file.name)
5153
assert not os.path.exists(real_temp_file.name)
5254
assert os.path.exists(fake_temp_file.name)
55+
56+
57+
class TestModuleScopedFsWithTmpdir:
58+
@pytest.fixture(autouse=True)
59+
def test_internal(self, tmpdir):
60+
yield
61+
62+
def test_fail(self, fs_module):
63+
# Regression test for #684
64+
assert True

pyfakefs/tests/fake_filesystem_unittest_test.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
from pathlib import Path
3333
from unittest import TestCase, mock
3434

35-
import pytest
36-
3735
import pyfakefs.tests.import_as_example
3836
import pyfakefs.tests.logsio
3937
from pyfakefs import fake_filesystem_unittest, fake_filesystem
@@ -881,15 +879,5 @@ def test_is_absolute(self, fs):
881879
self.assertTrue(pathlib.Path(".").absolute().is_absolute())
882880

883881

884-
class TestModuleScopedFsWithTmpdir:
885-
@pytest.fixture(autouse=True)
886-
def test_internal(self, tmpdir):
887-
yield
888-
889-
def test_fail(self, fs_module):
890-
# Regression test for #684
891-
assert True
892-
893-
894882
if __name__ == "__main__":
895883
unittest.main()

0 commit comments

Comments
 (0)