GithubHelp home page GithubHelp logo

Comments (6)

AltSysrq avatar AltSysrq commented on July 30, 2024

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.

haraldmaida avatar haraldmaida commented on July 30, 2024

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.

AltSysrq avatar AltSysrq commented on July 30, 2024

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.

haraldmaida avatar haraldmaida commented on July 30, 2024

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.

AltSysrq avatar AltSysrq commented on July 30, 2024

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.

AltSysrq avatar AltSysrq commented on July 30, 2024

This is fixed in 0.7.1, now including full-stack tests for both platforms.

from proptest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.