Skip to content

Conversation

@bluetech
Copy link
Member

This fixes #7913 (hopefully). There are some other commits I made to testing while debugging this but they are not critical.

Make the tests work when running with PYTHONPYCACHEPREFIX (possible when
running in a dirty environment, not under tox).
Part of investigating a bug, but didn't fix it.
Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely

In pytester tests, pytest stashes & restores the sys.modules for each
test. So if the test imports a new module, it is initialized anew each
time.

Turns out the readline module isn't multi-init safe, which causes
pytester.spawn to crash or hang. So preserve it as a workaround.
@bluetech
Copy link
Member Author

I'll merge already to fix the broken CI, but let me know if there are any further comments.

@bluetech bluetech merged commit 8105e60 into pytest-dev:master Oct 25, 2020
@nicoddemus
Copy link
Member

Awesome, thanks @bluetech!

@bluetech bluetech deleted the testing-fixes branch November 6, 2020 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

testing: test_pdb_unittest_postmortem get stuck with pexpect

3 participants