Summary
While working on issue #939, I noticed that all 5 tests in
tests/test_scripts.py fail on the current master branch
before any changes.
Root Cause
The get_results_file_path() function in tests/test_scripts.py
runs floss/main.py with --no static -j to generate a
results.json file. However the command fails and writes an
error message instead of valid JSON, causing all subsequent
script tests to fail with a pydantic ValidationError.
Steps to Reproduce
- Clone the repo
- Install dependencies with
pip install -e ".[dev]"
- Run
python -m pytest tests/test_scripts.py -v
Expected Result
All 5 tests pass
Actual Result
All 5 tests fail with:
Invalid JSON: expected value at line 1 column 1
Environment
- OS: Windows 11
- Python: 3.11.9
- pytest: 8.4.1
Summary
While working on issue #939, I noticed that all 5 tests in
tests/test_scripts.pyfail on the current master branchbefore any changes.
Root Cause
The
get_results_file_path()function intests/test_scripts.pyruns
floss/main.pywith--no static -jto generate aresults.jsonfile. However the command fails and writes anerror message instead of valid JSON, causing all subsequent
script tests to fail with a pydantic
ValidationError.Steps to Reproduce
pip install -e ".[dev]"python -m pytest tests/test_scripts.py -vExpected Result
All 5 tests pass
Actual Result
All 5 tests fail with:
Invalid JSON: expected value at line 1 column 1Environment