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

Trim output from tests #37

Merged
merged 4 commits into from
May 15, 2024
Merged

Trim output from tests #37

merged 4 commits into from
May 15, 2024

Conversation

jacquesalice
Copy link
Member

In this PR:

  • Remove free-floating print statements (i.e. those that don't use if showact)
  • Set verbose=False for statements that had previously explicitly set verbose=True

All 64 tests pass against sparcdev2 and sparc1 (with VPN on). Output now looks like this for sparcdev2:

Arranging to run doctests against: sparcl.client
Arranging to run doctests against: sparcl.gather_2d
sssssss.................sRunning Client tests
  against Server: "sparcdev2.csdc.noirlab.edu:8050"
  comparing to: tests.expected_pat
  showact=False
  showcurl=False
  client=(sparclclient:1.2.2b8, api:11.0, http://sparcdev2.csdc.noirlab.edu:8050/sparc, client_hash=, verbose=False, connect_timeout=1.1, read_timeout=5400.0)

...s..sss..............................
----------------------------------------------------------------------
Ran 64 tests in 72.902s

OK (skipped=12)

And this for sparc1:

Arranging to run doctests against: sparcl.client
Arranging to run doctests against: sparcl.gather_2d
sssssss.................sRunning Client tests
  against Server: "sparc1.datalab.noirlab.edu"
  comparing to: tests.expected_pat
  showact=False
  showcurl=False
  client=(sparclclient:1.2.2b8, api:11.0, https://sparc1.datalab.noirlab.edu/sparc, client_hash=, verbose=False, connect_timeout=1.1, read_timeout=5400.0)

...s..sss..............................
----------------------------------------------------------------------
Ran 64 tests in 79.100s

OK (skipped=12)

tests/tests_api.py Show resolved Hide resolved
@pothiers pothiers self-assigned this May 14, 2024
@jacquesalice
Copy link
Member Author

@pothiers context is now printed only once. Output after running tests looks like:

Arranging to run doctests against: sparcl.client
Arranging to run doctests against: sparcl.gather_2d
sssssssRunning Client Tests
against Server: "sparc1.datalab.noirlab.edu"
comparing to: tests.expected_pat
showact=False
showcurl=False
client=(sparclclient:1.2.2b8, api:11.0, https://sparc1.datalab.noirlab.edu/sparc, client_hash=, verbose=False, connect_timeout=1.1, read_timeout=5400.0)
.................s...s..sss..............................
----------------------------------------------------------------------
Ran 64 tests in 83.569s
OK (skipped=12)

Copy link
Collaborator

@pothiers pothiers left a comment

Choose a reason for hiding this comment

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

In the future, we may want to initialized show_run_context from an env var (like "showact") with a default value of True.

@pothiers pothiers merged commit 3e50bc9 into main May 15, 2024
0 of 3 checks passed
@jacquesalice jacquesalice deleted the trim_output branch May 15, 2024 23:30
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