File: test_infrastructure_tests.py

package info (click to toggle)
python-eventlet 0.40.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,200 kB
  • sloc: python: 25,101; sh: 78; makefile: 31
file content (15 lines) | stat: -rw-r--r-- 489 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""Tests for the testing infrastructure."""

from . import run_python


def test_run_python_timeout():
    output = run_python('', args=('-c', 'import time; time.sleep(0.5)'), timeout=0.1)
    assert output.endswith(b'FAIL - timed out')


def test_run_python_pythonpath_extend():
    code = '''import os, sys ; print('\\n'.join(sys.path))'''
    output = run_python('', args=('-c', code), pythonpath_extend=('dira', 'dirb'))
    assert b'/dira\n' in output
    assert b'/dirb\n' in output