-
Notifications
You must be signed in to change notification settings - Fork 11
Add Platform methods for BSD distros #338
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,6 +9,14 @@ | |||||||||||||||||||||||||
| if Platform.is_macos (1 | 0) + | ||||||||||||||||||||||||||
| if Platform.is_windows (1 | 0) | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| :it "detects FreeBSD, OpenBSD, NetBSD and Dragonfly" | ||||||||||||||||||||||||||
| if Platform.is_bsd (assert: ( | ||||||||||||||||||||||||||
| Platform.is_freebsd || | ||||||||||||||||||||||||||
| Platform.is_openbsd || | ||||||||||||||||||||||||||
| Platform.is_netbsd || | ||||||||||||||||||||||||||
| Platform.is_dragonfly | ||||||||||||||||||||||||||
| )) | ||||||||||||||||||||||||||
|
Comment on lines
+13
to
+18
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe that of these four platforms are mutually exclusive, right? If so, then I think a test like the following would be more robust, and cover more failure cases:
Suggested change
That is, this tests that exactly one of those specific BSD platforms is true if and only if the overall platform designation is BSD - and if it's not BSD, then none of them are true. |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| :it "returns True for is_posix on POSIX platforms" | ||||||||||||||||||||||||||
| if Platform.is_linux (assert: Platform.is_posix) | ||||||||||||||||||||||||||
| if Platform.is_bsd (assert: Platform.is_posix) | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
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.
Here's a tiny stupid English nitpick: