File: test_shutdown.py

package info (click to toggle)
python-pluginbase 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 268 kB
  • sloc: python: 537; makefile: 118
file content (15 lines) | stat: -rw-r--r-- 413 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import os
import sys
import subprocess


def test_clean_shutdown():
    env = dict(os.environ)
    env['PYTHONPATH'] = '..:.'
    c = subprocess.Popen([sys.executable, '-c', 'import shutdown'],
                         stdout=subprocess.PIPE,
                         stderr=subprocess.PIPE,
                         env=env)
    stdout, stderr = c.communicate()
    assert stdout == b''
    assert stderr == b''