Skip to content

Commit

Permalink
Move test to pytest plugin tests where it belongs
Browse files Browse the repository at this point in the history
- test needs installed pyfakefs
- shall fix #687
  • Loading branch information
mrbean-bremen committed Jul 13, 2022
1 parent a41a03d commit 5f59b09
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 12 additions & 0 deletions pyfakefs/pytest_tests/pytest_plugin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import os
import tempfile

import pytest

from pyfakefs.fake_filesystem_unittest import Pause


Expand Down Expand Up @@ -50,3 +52,13 @@ def test_pause_resume_contextmanager(fs):
assert os.path.exists(real_temp_file.name)
assert not os.path.exists(real_temp_file.name)
assert os.path.exists(fake_temp_file.name)


class TestModuleScopedFsWithTmpdir:
@pytest.fixture(autouse=True)
def test_internal(self, tmpdir):
yield

def test_fail(self, fs_module):
# Regression test for #684
assert True
12 changes: 0 additions & 12 deletions pyfakefs/tests/fake_filesystem_unittest_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
from pathlib import Path
from unittest import TestCase, mock

import pytest

import pyfakefs.tests.import_as_example
import pyfakefs.tests.logsio
from pyfakefs import fake_filesystem_unittest, fake_filesystem
Expand Down Expand Up @@ -881,15 +879,5 @@ def test_is_absolute(self, fs):
self.assertTrue(pathlib.Path(".").absolute().is_absolute())


class TestModuleScopedFsWithTmpdir:
@pytest.fixture(autouse=True)
def test_internal(self, tmpdir):
yield

def test_fail(self, fs_module):
# Regression test for #684
assert True


if __name__ == "__main__":
unittest.main()

0 comments on commit 5f59b09

Please sign in to comment.