Skip to content

Conversation

@Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Nov 14, 2025

This is disabled by default and hides the output of the module command.
That is usually just "noise" hiding the relevant part of the log.

With it disabled the output looks like:

== 2025-11-14 10:58:31,197 run.py:511 INFO Running shell command '/opt/lmod/lmod/libexec/lmod python load GCC/4.6.3' in /git/easybuild-framework
== 2025-11-14 10:58:31,261 run.py:625 INFO Shell command completed successfully: /opt/lmod/lmod/libexec/lmod python load GCC/4.6.3

I added small refactorings and fixes I've seen:

  • The type hint allows auto-completing in IDEs which is quite helpful for writing the test
  • re.sub('module use [...]', modtxt, re.M) was wrong: The 3rd parameter is count not flags

Includes:

@boegel
Copy link
Member

boegel commented Dec 7, 2025

@Flamefire merge conflict to resolve...

@Flamefire
Copy link
Contributor Author

Looks like I identified and fixed the same bug in the tests in multiple occasions.

Rebased

@Flamefire Flamefire force-pushed the silent-module-cmd branch 2 times, most recently from 955e13d to 82ab5ec Compare December 18, 2025 10:21
When the exception is thrown and ignored `stdout` is unassigned so the
following tests cannot be done.
C&P that code is not necessary when `tmpdir` isn't used or the catch is
at the end of a test.
This is disabled by default and hides the output of the module command.
That is usually just "noise" hiding the relevant part of the log.

With it disabled the output looks like:
> == 2025-11-14 10:58:31,197 run.py:511 INFO Running shell command '/opt/lmod/lmod/libexec/lmod python load GCC/4.6.3' in /git/easybuild-framework
> == 2025-11-14 10:58:31,261 run.py:625 INFO Shell command completed successfully: /opt/lmod/lmod/libexec/lmod python load GCC/4.6.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants