Skip to content

Commit

Permalink
finally, completely removing pyfakefs this time
Browse files Browse the repository at this point in the history
  • Loading branch information
travishathaway committed May 10, 2022
1 parent 4d27121 commit 581bd3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ glob2
jinja2
pkginfo
psutil
pyfakefs
pytest
pytest-cov
pytest-mock
Expand Down
9 changes: 5 additions & 4 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from typing import NamedTuple

import pytest
from pyfakefs.fake_filesystem import FakeFilesystem

from conda_build.exceptions import BuildLockError
import conda_build.utils as utils
Expand Down Expand Up @@ -504,11 +503,13 @@ class IsCondaPkgTestData(NamedTuple):


@pytest.mark.parametrize('value,expected,is_dir,create', IS_CONDA_PKG_DATA)
def test_is_conda_pkg(fs: FakeFilesystem, value: str, expected: bool, is_dir: bool, create: bool):
def test_is_conda_pkg(tmpdir, value: str, expected: bool, is_dir: bool, create: bool):
if create:
value = os.path.join(tmpdir, value)
if is_dir:
fs.create_dir(value)
os.mkdir(value)
else:
fs.create_file(value)
with open(value, "w") as fp:
fp.write("test")

assert utils.is_conda_pkg(value) == expected

0 comments on commit 581bd3d

Please sign in to comment.