File: test_simplerun.py

package info (click to toggle)
python-nvchecker 2.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 736 kB
  • sloc: python: 4,801; makefile: 25
file content (21 lines) | stat: -rw-r--r-- 427 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# MIT licensed
# Copyright (c) 2022 lilydjwg <lilydjwg@gmail.com>, et al.

import sys
import tempfile
import subprocess

def test_simple_run():
  '''make sure the tool as a whole can run the simplest check'''
  with tempfile.NamedTemporaryFile(mode='w') as f:
    f.write('''\
[t]
source = "cmd"
cmd = "echo 1"
''')
    f.flush()
    subprocess.check_call([
      sys.executable, '-m', 'nvchecker',
      '-c', f.name,
    ])