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

Using mockRunLogs in a better way #1106

Merged
merged 4 commits into from
Jan 19, 2023
Merged

Using mockRunLogs in a better way #1106

merged 4 commits into from
Jan 19, 2023

Conversation

john-science
Copy link
Member

Description

It turns out, in our unit tests, people have been directly accessing ._outputStream when there was already a method to access that value: .getStdoutValue(). Well, let's just use that method instead.

Also, I changed the name of that method to .getStdout() to make it easier to use and added a new method, because we tend to need it a lot: .emptyStdout().

NOTE: This change was chosen because it does not break any downstream code.


Checklist

  • This PR has only one purpose or idea.
  • Tests have been added/updated to verify that the new/changed code works.
  • The release notes (location doc/release/0.X.rst) are up-to-date with any bug fixes or new features.
  • The documentation is still up-to-date in the doc folder.
  • The dependencies are still up-to-date in setup.py.

@john-science john-science added the cleanup Code/comment cleanup: Low Priority label Jan 19, 2023
@john-science john-science requested a review from keckler January 19, 2023 17:43
@john-science john-science linked an issue Jan 19, 2023 that may be closed by this pull request
Copy link
Member

@opotowsky opotowsky left a comment

Choose a reason for hiding this comment

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

This wins the award for most monotonous PR .

Hero's work, thanks!

@john-science john-science merged commit f1d192f into main Jan 19, 2023
@john-science john-science deleted the improve_mockRunLogs branch January 19, 2023 22:20
drewj-usnctech added a commit to drewj-usnctech/armi that referenced this pull request Jan 23, 2023
…30/assembly-1d-parent-class

* terrapower/main:
  Adding measure of convergence for tight coupling  (terrapower#1033)
  Fixing ruamel.yaml deprecation warning (terrapower#1109)
  Fix Issues with Peak Params (terrapower#1108)
  Adding a helper method to validate versions in settings files (terrapower#1102)
  Using fuelCycle settings constants (terrapower#1107)
  Using mockRunLogs in a better way (terrapower#1106)
  Using module-level neutronics settings constants (terrapower#1104)
  Cleanup umc (terrapower#1099)
  Fixing broken doc link for mpi4py (terrapower#1105)
  Improving logic for getNumPins (terrapower#1098)
  fix `code-block` sphinx errors (terrapower#1091)
  Defer setting material number in MCNP material card (terrapower#1086)
  Efficiency improvement for uniform mesh converter and general operations (terrapower#1042)
  Updating python version listed in README (terrapower#1076)
  Removing unused code from `calcReactionRates()` (terrapower#1084)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code/comment cleanup: Low Priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve mockRunLogs
2 participants