-
Notifications
You must be signed in to change notification settings - Fork 633
Fix fileno error on Windows (robotell bus) #1313
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
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1313 +/- ##
===========================================
- Coverage 66.00% 65.98% -0.03%
===========================================
Files 86 86
Lines 8945 8948 +3
===========================================
Hits 5904 5904
- Misses 3041 3044 +3 |
Can you add a test that ensures a NotImplementedError on Windows but not on Linux? |
I added a function that test the fileno method, but in the tests will always raise a NotImplementedError in both Windows and Linux because it is opening the serial port as 'loop://', which simulates a loopback connection, so I think it is not necessary to discriminate the OS The bad thing is that I don't know how to test if the function returns a valid fileno |
Thank you 👍 |
Change implemented similar to that made in hardbyte#1313. This means notifiers will now work with the Serial interface.
Handling io.UnsupportedOperation and raising NotImplementedError prevents #1312 bug