Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pytest error #712

Merged
merged 1 commit into from
Apr 4, 2024
Merged

Conversation

leocardao
Copy link
Contributor

When pytest is used with xdist and junitxml, tests are not run in the main thread. In addition, signals can only be used in the main thread.

This results in the failure of some tests that attempt to define a signal handler.

The signal handler causing the error is not tested, so we simply disable the handler if the current thread is not the main thread.

src/e3/main.py Outdated Show resolved Hide resolved
When pytest is used with xdist and junitxml, tests are not run in the main
thread. In addition, signals can only be used in the main thread.

This results in the failure of some tests that attempt to define a signal
handler.

The signal handler causing the error is not tested, so we simply disable
the handler if the current thread is not the main thread.
@leocardao leocardao merged commit 3245785 into AdaCore:master Apr 4, 2024
11 checks passed
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.

3 participants