Adds basic test for convert command.
This commit is contained in:
15
tests/commands/test_init.py
Normal file
15
tests/commands/test_init.py
Normal file
@ -0,0 +1,15 @@
|
||||
import os
|
||||
|
||||
from bonobo.util.testing import all_runners
|
||||
|
||||
|
||||
@all_runners
|
||||
def test_init_file(runner, tmpdir):
|
||||
target = tmpdir.join('foo.py')
|
||||
target_filename = str(target)
|
||||
runner('init', target_filename)
|
||||
assert os.path.exists(target_filename)
|
||||
|
||||
out, err = runner('run', target_filename)
|
||||
assert out.replace('\n', ' ').strip() == 'Hello World'
|
||||
assert not err
|
||||
Reference in New Issue
Block a user