Skip to content

Commit

Permalink
Wrap debug output in try/catch so it always gets printed
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-msphere committed Apr 19, 2018
1 parent c29cf76 commit 2868438
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ def replay_session(monkeypatch):
monkeypatch.setattr(requests, 'Session',
lambda *args, **kwargs: mock_session)

yield mock_session

print('Actual session requests:')
print(mock_session.debug_cache)
try:
yield mock_session
finally:
print('Actual session requests:')
print(mock_session.debug_cache)


@pytest.fixture
Expand Down

0 comments on commit 2868438

Please sign in to comment.