Skip to content

2025 Testing update: Black 25.1.0, testing Qt withough X11#3463

Merged
blnicho merged 6 commits intoPyomo:mainfrom
jsiirola:qt-test-fix
Jan 30, 2025
Merged

2025 Testing update: Black 25.1.0, testing Qt withough X11#3463
blnicho merged 6 commits intoPyomo:mainfrom
jsiirola:qt-test-fix

Conversation

@jsiirola
Copy link
Copy Markdown
Member

@jsiirola jsiirola commented Jan 29, 2025

Fixes # .

Summary/Motivation:

This works around an issue observed when running on Jenkins with new versions of pytest-qt and PyQt6. When run in an interactive shell with an active X11 session pyomo/contrib/viewer/tests/test_qt.py ran without error. However, when run in the default Jenkins environment (without an X11 session), running the tests resulted in a core dump. The workaround appears to be to set an environment variable before initializing the Qt environment.

Changes proposed in this PR:

  • Update codebase for Black 25.1.0
  • Set QT_QPA_PLATFORM=offscreen before testing Qt viewer

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@jsiirola jsiirola changed the title Update Qt tests to work without active X11 session 2025 Testing update: Black 25.1.0, testing Qt withough X11 Jan 29, 2025
Copy link
Copy Markdown
Member

@blnicho blnicho left a comment

Choose a reason for hiding this comment

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

I found a typo and have one other nonfunctional suggestion but otherwise this looks fine.

jsiirola and others added 2 commits January 29, 2025 11:32
Co-authored-by: Bethany Nicholson <[email protected]>
Co-authored-by: Bethany Nicholson <[email protected]>
@blnicho blnicho merged commit 095a6ed into Pyomo:main Jan 30, 2025
@jsiirola jsiirola deleted the qt-test-fix branch February 5, 2025 14:24
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.

2 participants