File: _debugger_case_gevent_subprocess.py

package info (click to toggle)
pydevd 3.3.0%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 13,892 kB
  • sloc: python: 77,508; cpp: 1,869; sh: 368; makefile: 50; ansic: 4
file content (16 lines) | stat: -rw-r--r-- 462 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from gevent import monkey
monkey.patch_all()

import subprocess
import sys
import os

if __name__ == "__main__":
    if '-foo' in sys.argv:
        print('foo called')
    else:
        if os.environ.get('CALL_PYTHON_SUB') == '1':
            assert 'foo called' in subprocess.check_output([sys.executable, __file__, '-foo']).decode('utf-8')
        else:
            subprocess.check_output("tput -T xterm-256color bold".split())
        print('TEST SUCEEDED')