Comments (6)
found that the source_path is relative to the workspace root, e.g. my_member_crate/src/lib.rs
Odd, what OS are you on? I thought file!()
always gave an absolute path
from proptest.
It all happens on Windows 10.
Tests are executed with Cargo test.
Rust itself is setup via rustup. Rust 1.22.1 stable
I thought I double check it and added a println("{:?}", file!());
to one of my tests in a member crate and it prints out: "member_crate\src\my_mod.rs".
from proptest.
Thanks for the info! It looks like this problem also affected non-workspace projects as well.
This has been fixed in version 0.3.4, manually verified on Windows 10 with both non-workspace and workspace configurations. Anyone affected by this bug will need to manually move any persistence files to the correct location, for example by running in cmd or PS:
move my_member_crate\my_member_crate\somesource.proptest-regressions my_member_crate\proptest-regressions\somesource.txt
The exact location where the files were incorrectly placed was dependent on the working directory when the tests were run. This means that if you ran tests outside of cargo, it is theoretically possible to have multiple persistence files that belong in the same place. If this has happened, simply concatenating the respective files will merge them correctly.
from proptest.
Unfortunately starting from proptest version 0.7 the exact same behavior as in the original issue is happening again. In version 0.5 and 0.6 everything works perfectly fine.
I'm on Windows 10. Rust 1.26.0 stable.
It makes no difference whether I call "cargo test" from the workspace directory or inside the directory of the member-crate.
If I can help somehow please let me know. Let me thank you for the great work on this crate. I really love to use proptest in my projects.
from proptest.
Sorry about the regression, I'll take a look this weekend. I'll also see about adding some automated tests around it this time.
from proptest.
This is fixed in 0.7.1, now including full-stack tests for both platforms.
from proptest.
Related Issues (20)
- First-class support for async functions
- The type 'EasyCashIdentity.EntityLayer.Concrete.AppUser' cannot be used as type parameter
- rust-analyzer doesn't like the derive(Arbitrary) generated code for enums HOT 1
- Zero Examples of `impl Arbitrary` ? HOT 3
- Finite state machines HOT 1
- proptest_derive triggers non-local impl nightly warning HOT 1
- Update "shrinks to" comment on the same seed failures HOT 1
- Panic on empty ranges during strategy creation HOT 3
- Don't require `Arbitrary::Parameters` to implement `Default` HOT 4
- Recursive `arbitrary` calls HOT 3
- Change verbosity of shrink disabled and persisted failure messages HOT 3
- Provide access to state for (debug) printing transitions HOT 5
- feat: add option to interrupt test runner HOT 2
- derive macro for Arbitrary is hard to find HOT 4
- Attribute macro #[property_test] available in docs, but undocumented and behind undocumented feature HOT 1
- Lift MSRV to 1.70 to relax dependency on trybuild
- RangeInclusive of floats containing one element panics
- Improve logging for state machine testing
- The ` state_machine_echo_server` example does not compile HOT 2
- Proptest logging
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proptest.