Skip to content

Commit

Permalink
Remove pyfakefs workaround for missing /dev/null
Browse files Browse the repository at this point in the history
The apb requested GH Actions run for this repo failed on 2020-12-25. Upon
investigation I saw that the error was

FileExistsError: [Errno 17] File exists in the fake filesystem: '/dev/null'

I then checked for recent releases for pyfakefs (and pytest), and saw that
v4.3.3 came out on 2020-12-20. Looking into changes I saw that pyfakefs fixed
the null device name in
pytest-dev/pyfakefs@f1e5163
, which appears to have been the underlying problem that caused us to manually
create '/dev/null' in the first place to workaround pytest needing it for the
caplog fixture.
  • Loading branch information
mcdonnnj committed Dec 28, 2020
1 parent 7d4ad91 commit 1bee81d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tests/test_ioc_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ def test_fs(fs):
fs.add_real_directory("tests/targets")
fs.add_real_file("tests/testblob.txt")

# In the pytest 6.x release something has changed where the caplog fixture
# needs to access /dev/null as part of its operation. As a result we need to
# manually create it in the fake filesystem.
fs.create_file("dev/null")
yield fs


Expand Down

0 comments on commit 1bee81d

Please sign in to comment.