IronLanguages / IronLanguages/ironpython3
Tests which run in release mode with -E fail to load the standard library
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.8k
- Forks
- 316
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 1
Description
For example, test_calendar checks the output of:
ipy -I -m calendar
but this fails with:
Could not import runpy module
The reason for this failure is because when running tests, the standard library is added to sys.path using IRONPYTHONPATH which is ignored when using -E (or -I). This does not occur in debug mode since the path is added to sys.path in an #if DEBUG section of the code.
Contributor guide
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.
Research direction
Start with the test_calendar case, especially the ipy -I -m calendar invocation, and trace how release-mode tests add the standard library to sys.path. Inspect the #if DEBUG path and the handling of IRONPYTHONPATH under -E and -I. Done means the release-mode test loads the standard library and passes without relying on the ignored environment path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, python
- Domain
- compilers, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100