IronLanguages / IronLanguages/ironpython3

Some test cases try to run ipy with -I and fail in release mode

Open
#1,440 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.6 testing
Dominant language
C#
Stars
2.8k
Forks
316
Avg merge
1d 9h
Merged PRs (30d)
1

Description

This is basically like trying to import a module when running from the bin/Release folder without having set IRONPYTHONPATH. Because our standard libary is not in the normal location it fails to import.

For example.

bin/Release/net46/ipy.exe -I -c "import runpy"

will always fail because the standard library is not found on the path.

In 3.6, some tests, in test_gzip and test_macpath for example, use the test.support.script_helper.assert_python_ok method which runs ipy in isolated mode by default. This is causing failures.

A workaround was added to https://github.com/IronLanguages/ironpython3/pull/1427 and should be reverted once this is resolved.


Edit for searchability: The -I command line options is used to isolate Python from the user's environment (implies -E and -s)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with bin/Release/net46/ipy.exe -I -c "import runpy". Inspect the test_gzip and test_macpath cases and their use of test.support.script_helper.assert_python_ok, then review the workaround from pull request 1427. Done means the affected isolated-mode tests pass in release mode without that workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.