Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pyfakefs Workaround for Missing /dev/null #20

Merged
merged 1 commit into from
Dec 28, 2020

Conversation

mcdonnnj
Copy link
Member

@mcdonnnj mcdonnnj commented Dec 28, 2020

πŸ—£ Description

This PR removes the manual creation of /dev/null that was added in #15 to resolve issues with pytest v6.

πŸ’­ Motivation and Context

I saw that on 2020-12-25 the apb requested GitHub Actions run failed. Upon investigation I saw that pyfakefs v4.3.3 was released on 2020-12-20. Digging into the changes I saw that in pytest-dev/pyfakefs@f1e5163 they fixed the null device name (/dev/nul -> /dev/null), which is likely why we had to manually create it previously.

πŸ§ͺ Testing

Tests pass as expected again.

βœ… Checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

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.
@mcdonnnj mcdonnnj added the bug This issue or pull request addresses broken functionality label Dec 28, 2020
@mcdonnnj mcdonnnj self-assigned this Dec 28, 2020
@mcdonnnj mcdonnnj requested a review from jsf9k December 28, 2020 15:45
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this- good job! πŸ‘

Copy link
Member

@jsf9k jsf9k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@mcdonnnj mcdonnnj merged commit 247f5fa into develop Dec 28, 2020
@mcdonnnj mcdonnnj deleted the bugfix/undo_pyfakefs_dev_null_workaround branch December 28, 2020 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue or pull request addresses broken functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants