Skip to content

Commit

Permalink
Merge pull request pytest-dev#124 from manahl/xfang-suppress-stacktrace
Browse files Browse the repository at this point in the history
pytest-server-fixtures: suppress stacktrace if kill() is called
  • Loading branch information
javefang authored Feb 20, 2019
2 parents 0179e66 + 3553d7a commit 56fbb1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

### 1.6.1 (Unrelease)
* pytest-server-fixtures: fix exception when attempting to access hostname while server is not started
* pytest-server-fixtures: suppress stacktrace if kill() is called

### 1.6.0 (2019-02-12)
* pytest-server-fixtures: added previously removed TestServerV2.kill() function
Expand Down
4 changes: 4 additions & 0 deletions pytest-server-fixtures/pytest_server_fixtures/base2.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ def kill(self):
if not self._server:
log.debug("Server not started yet, skipping")
return

# Prevent traceback printed when the server goes away as we kill it
self._server.exit = True

self._server.teardown()
self._server = None
self._killed = True
Expand Down

0 comments on commit 56fbb1c

Please sign in to comment.