mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-02-08 14:27:07 +00:00
add a test to test the whole command tool
This commit is contained in:
parent
ac1aafc9f1
commit
d5920efa54
21
tests/test_simplerun.py
Normal file
21
tests/test_simplerun.py
Normal file
@ -0,0 +1,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,
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user