Skip to content

Commit

Permalink
Add a message about how to update recordings
Browse files Browse the repository at this point in the history
  • Loading branch information
betatim committed Nov 10, 2020
1 parent ce57fe4 commit e62d58c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions binderhub/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def pytest_configure(config):
"markers", "github_api: mark test to run only with GitHub API credentials"
)


def pytest_terminal_summary(terminalreporter, exitstatus):
"""This function has meaning to pytest, for more information, see:
https://docs.pytest.org/en/stable/reference.html#pytest.hookspec.pytest_terminal_summary
Expand All @@ -72,6 +73,9 @@ def pytest_terminal_summary(terminalreporter, exitstatus):
for host, records in hosts.items():
fname = 'http-record.{}.json'.format(host)
print("Recorded http responses for {} in {}".format(host, fname))
print("To update the recordings used by the tests you will have"
" to move or merge the newly created recordings with existing"
f" recordings in {here}.")

with open(fname, 'w') as f:
json.dump(records, f, sort_keys=True, indent=1)
Expand Down

0 comments on commit e62d58c

Please sign in to comment.