-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add support for named pipes and sockets #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - other than some issues with the docstrings, I think this looks good.
testpath/asserts.py
Outdated
raise AssertionError(msg) | ||
|
||
def assert_issocket(path, follow_symlinks=True, msg=None): | ||
"""Assert that path exists and is a named pipe (FIFO). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These docstrings should probably say 'Unix domain socket' rather than 'named pipe'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
testpath/asserts.py
Outdated
"""Assert that path exists and is a named pipe (FIFO). | ||
|
||
With follow_symlinks=True, the default, this will pass if path is a symlink | ||
to a regular file. With follow_symlinks=False, it will fail in that case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'regular file' -> 'named pipe'
Similarly in all four of the new docstrings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
fd0f6c6
to
7cc3233
Compare
Thanks! |
I've added them to the docs as well: |
Ah! A new release already! Cool 👍 |
I haven't actually done a release yet - I'll give it a little while in case there's other things to add soon. But I'm pre-emptively marking them as 'new in' to give people reading the docs a hint why those functions aren't there for them. |
This commits adds asserts for named pipe (FIFO) and socket file types.