test_python_dash_m_faircode_runs_the_cli fails when the installed faircode script belongs to another Python
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #1103 by @propcgamer20-png — merged
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Read tests/test_cli.py, especially test_python_dash_m_faircode_runs_the_cli, and check how it locates and runs the faircode console script. Use sys.executable to identify the matching Scripts or bin directory, and skip with a clear message when no script is present. Run the named pytest test with a stray script on PATH, then run make test-fast; done means both checks pass and the matching console script is still verified when available.
Written by the indexing model from the issue text.
Description
Where: tests/test_cli.py test_python_dash_m_faircode_runs_the_cli (the last four lines).
Current gap: after the python -m faircode checks, the test runs the first faircode found on PATH with --version and asserts exit code 0. On a machine where which faircode points at a console script installed for a different Python (for example a system Python without this checkout installed), that script exits 1 with ModuleNotFoundError: No module named 'faircode', and the test fails even though the repo is fine. CI passes only because its faircode is the editable install of the same interpreter.
Repro: on a machine with a stray faircode console script on PATH that cannot import the package (/Library/Frameworks/Python.framework/Versions/3.13/bin/faircode here): python3 -m pytest tests/test_cli.py::test_python_dash_m_faircode_runs_the_cli.
Suggested approach: locate the script that belongs to sys.executable (the Scripts/bin directory next to it), run that one, and skip the check with a clear message if there is none, instead of trusting PATH.
Done when: the test passes with a stray faircode script on PATH, still verifies the console script when one exists for the running interpreter, and make test-fast is green on a machine with several Pythons.
- Dominant language
- HTML
- Stars
- 47
- Forks
- 45
- Avg merge
- 3h 4m
- Merged PRs (30d)
- 83
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from yakew7/Fair-Code
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Numeric column headers keep their type in Python (the integer 2020) and are text in the web enginePossibly taken @snehal1931 claimed this 5 days ago. Openbug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yakew7/Fair-Code#1045 · 2 comments ·
Maintainers usually reply within 1 day
-
JSON string cells "NA" and "" are missing in the web engine and ordinary values in PythonPossibly taken @snehal1931 claimed this 5 days ago. Openbug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
yakew7/Fair-Code#1036 · 2 comments ·
Maintainers usually reply within 1 day
-
check_issue_refs fails a pull request that says it closes an issue the pull request itself closesOpenenhancement help wanted
Difficulty 3/5 1-2 days Newbie friendliness 76/100
Maintainers usually reply within 1 day
All issues in yakew7/Fair-Code
Similar issues
-
area: image-engine bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
snapotter-hq/SnapOtter#3885 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 4 days
-
render_findings.py reads and writes in the host's default encoding, so findings.html breaks on a cp1252 Windows hostPossibly taken @Aaqibhafeezkhan claimed this today. Openbug good first issue mentored python size: XS up-for-grabs
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dheerajjha/mcp-migrate#366 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
AIssoufi/issoufi.fr#427 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue server
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day