-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Test appending to file #118
Conversation
Codecov Report
@@ Coverage Diff @@
## main #118 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 358 358
Branches 73 73
=========================================
Hits 358 358 Continue to review full report at Codecov.
|
I'm afraid this is not going to work. MacOS filesystem notifications can be significantly delayed, sometimes by seconds. You can also get an "added" or "modified" when you delete a file The unit tests in You can see this by enabling debug and running watchfiles on MacOS - events are significantly confused. |
We already have some logic to try and clean events which is for macos, but it can't cover all cases. Lines 67 to 76 in c35fa79
|
Thanks for the feedback, I think I'll just simplify tests in jupyter-server for now. We don't want to test watchfiles again there. If the PR is merged we'll just trust whatever watchfiles is doing. |
I agree that's the best way. You could even mock the rust code like we do in many of these tests. |
#113 will also help a lot with tests - avoiding tests hanging if no change is detected. I implemented that partly to help with the uvicorn tests for watchfiles, see encode/uvicorn#1437. |
Great, thanks! |
Just copying a test here from jupyter-server/jupyter_server#783, where we see it failing on MacOS.