mirror of
https://github.com/codespell-project/codespell.git
synced 2025-08-06 01:36:26 +08:00
ENH: Restructure for Travis
This commit is contained in:
17
codespell_lib/tests/test_basic.py
Normal file
17
codespell_lib/tests/test_basic.py
Normal file
@ -0,0 +1,17 @@
|
||||
import tempfile
|
||||
|
||||
from nose.tools import assert_equal
|
||||
|
||||
from codespell_lib import main
|
||||
|
||||
|
||||
def test_basic():
|
||||
"""Test some basic functionality"""
|
||||
assert_equal(main('_does_not_exist_'), 0)
|
||||
with tempfile.NamedTemporaryFile() as f:
|
||||
f.write('this is a test file\n'.encode('utf-8'))
|
||||
f.flush()
|
||||
assert_equal(main(f.name,), 0)
|
||||
f.write('abandonned'.encode('utf-8'))
|
||||
f.flush()
|
||||
assert_equal(main(f.name), 1)
|
Reference in New Issue
Block a user