mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-13 13:03:01 +00:00
Add inline comment to test
This commit is contained in:
@@ -46,15 +46,19 @@ def test_raise_error_on_missing_specified_config():
|
|||||||
Using the -f or --config flag when starting JupyterHub should require the
|
Using the -f or --config flag when starting JupyterHub should require the
|
||||||
file to be found and exit if it isn't.
|
file to be found and exit if it isn't.
|
||||||
"""
|
"""
|
||||||
|
# subprocess.run doesn't have a timeout flag, so if this test would fail by
|
||||||
|
# not letting jupyterhub error out, we would wait forever. subprocess.Popen
|
||||||
|
# allow us to manually timeout.
|
||||||
process = Popen(
|
process = Popen(
|
||||||
[sys.executable, '-m', 'jupyterhub', '--config', 'not-available.py']
|
[sys.executable, '-m', 'jupyterhub', '--config', 'not-available.py']
|
||||||
)
|
)
|
||||||
# wait inpatiently for the process to exit
|
# wait inpatiently for the process to exit like we want it to
|
||||||
for i in range(100):
|
for i in range(100):
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
returncode = process.poll()
|
returncode = process.poll()
|
||||||
if returncode is not None:
|
if returncode is not None:
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
process.kill()
|
process.kill()
|
||||||
assert returncode == 1
|
assert returncode == 1
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user