Skip to content

Commit fcb3ba7

Browse files
committed
Ensure the live server respect wait timeout
1 parent e9e2b01 commit fcb3ba7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test_live_server.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,14 @@ def two():
116116
result = appdir.runpytest('-v', '--no-start-live-server')
117117
result.stdout.fnmatch_lines(['*PASSED*'])
118118
assert result.ret == 0
119+
120+
def test_respect_wait_timeout(self, appdir):
121+
appdir.create_test_module('''
122+
import pytest
123+
124+
def test_should_fail(live_server):
125+
assert live_server._process.is_alive()
126+
''')
127+
result = appdir.runpytest('-v', '--live-server-wait=0.00001')
128+
result.stdout.fnmatch_lines(['**ERROR**'])
129+
assert result.ret == 1

0 commit comments

Comments
 (0)