Debian Codegraph @

tests/test_infrastructure_tests.py

raw
1 """Tests for the testing infrastructure."""
2
3 from . import run_python
4
5
6 def test_run_python_timeout():
7 output = run_python('', args=('-c', 'import time; time.sleep(0.5)'), timeout=0.1)
8 assert output.endswith(b'FAIL - timed out')
9
10
11 def test_run_python_pythonpath_extend():
12 code = '''import os, sys ; print('\\n'.join(sys.path))'''
13 output = run_python('', args=('-c', code), pythonpath_extend=('dira', 'dirb'))
14 assert b'/dira\n' in output
15 assert b'/dirb\n' in output