konstin / poc-monotrail

Proof Of Concept for python package management without virtualenvs
26 stars 4 forks source link

requirements_txt::test::test_empty_file fails on MacOS #56

Closed cnpryer closed 1 year ago

cnpryer commented 1 year ago

It doesn't fail every time, but when it does:

---- requirements_txt::test::test_empty_file stdout ----
thread 'requirements_txt::test::test_empty_file' panicked at 'assertion failed: `(left == right)`
  left: `2`,
 right: `1`: [Record { args: "Requirements file /Users/chrispryer/github/poc-monotrail/test-data/requirements-txt/empty.txt does not contain any dependencies", level: Warn, target: "monotrail_utils::requirements_txt", key_values: {} }, Record { args: "Requirements file /Users/chrispryer/github/poc-monotrail/test-data/requirements-txt/empty.txt does not contain any dependencies", level: Warn, target: "monotrail_utils::requirements_txt", key_values: {} }]', monotrail-utils/src/requirements_txt.rs:609:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

_Originally posted by @cnpryer in https://github.com/konstin/poc-monotrail/pull/53#discussion_r1225601526_

cnpryer commented 1 year ago

From logtest

//! Because Rust spawns per-test threads during integration testing, //! when testing log statements it's recommended to only have a single //! #[test] block per test file. That prevents possible race conditions from //! tests from running in parallel.

I can move this into

poc-monotrail/monotrail-utils on  monotrail-utils [!?] is 📦 v0.0.1 via 🦀 v1.70.0 
❯ tree
.
├── Cargo.toml
├── src
│   ├── lib.rs
│   └── requirements_txt.rs
└── tests
    └── test_requirements_txt_empty_file.rs    < -- here

as part of #53 if you'd like

konstin commented 1 year ago

That would be great, thanks for debugging this