-
Notifications
You must be signed in to change notification settings - Fork 82
Failing tests: tests/snapshots out of date #170
Comments
The tests don't really run on macOS to start with. I’ve restored running them in CI anyway. |
Oh, they don't? Weird, they seem to at least run. I think either the Debug or Display impl of the duration type being used in the failing test above has changed and that's the reason the tests are failing. I'm bringing it up because right now Nixpkgs packages this tool but the package is currently broken in repo for macOS. It's a great tool, maybe I can try my hand at a fix if you can point me in the direction of this Debug|Display impl that's causing failing tests? Or if there's a root cause I'm not seeing that's further work, I suppose I can send a PR to Nixpkgs to skip tests on Darwin. |
I've fixed the display discrepancy tests (well, I've changed the tests to pass, and I'll fix the actual issue upstream in the next point update), but the tests still won't work on macOS for platform differences reasons at a different level (iirc, notify, due to fsevents, but might be something else), so it's not really testing what it's purporting to. They don't work on Windows for... yet another reason, which I'm really confused about and haven't tracked down. You can absolutely use this issue as justification for not running tests in the nixos package, if needed. Also, the tests are stateful and need a directory to be cleared (or to run somewhere that's cleared every time, like CI) to complete, which is awful, but as mentioned in the latest commit here, the real behaviour tests are in watchexec, and it wasn't really a priority to have them here, given it's quite a bare "shell" over it. Always happy to have more / better tests contributed, of course. |
Weird! Would the issue in tweet you linked happen to be cause by Windows using a different encoding (UTF-16, perhaps?) than on the usual unix-y system? |
Most likely, but how to make it either work...? |
I'm seeing the same thing when trying to patch this for |
That's a good question. I don't know how this comparison is being made, but some kind of normalization would probably be necessary? I don't know much about the idiosyncrasies of the Windows platform, but maybe doing an in-memory comparison where you specifically encode the file contents to UTF-8 would fix the issue? That is even if that's what's exploding. |
It's all done by the insta tool, so maybe that's got an option. It might also be newlines: mitsuhiko/insta#172 |
Well, updating |
I've updated the tests to insta 1.7.1 among other things for 7.7.1, may help here. |
@davidarmstronglewis Can you handle the nixpkgs side to get it to latest? |
PR's been updated, confirming that I can disable the disabling of tests :) |
- tests have been fixed upstream: watchexec/cargo-watch#170
It looks like the latest few releases have broken tests caused by a change in loggin output. Not sure when it happened, but it's causing tests to fail. Here's the output from running
cargo test
locally on my machine:I think this might be related to Jenkins not having been run during the last few releases.
The text was updated successfully, but these errors were encountered: