Download:
child 131:0cb14e3f792e
parent 129:3a25896f01e1
130:7a9e1f1ae89f
Anton Shestakov <av6@dwimlabs.net>, Fri, 08 Jul 2016 00:31:50 +0800
tests: add simple checks for prevalidate()

1 файлов изменено, 11 вставок(+), 1 удалений(-) [+]
tests/test_checker.py file | annotate | diff | comparison | revisions
--- a/tests/test_checker.py Fri Jul 08 00:16:33 2016 +0800
+++ b/tests/test_checker.py Fri Jul 08 00:31:50 2016 +0800
@@ -1,4 +1,4 @@
-from checker import run, read_linter_config
+from checker import run, read_linter_config, prevalidate
def test_run():
@@ -30,3 +30,13 @@
config = read_linter_config('perfectlinter')
assert config is None
+
+
+def test_prevalidate():
+ assert not prevalidate({})
+
+ config = {'scm': 'fossil', 'url': 'http://www.fossil-scm.org/'}
+ assert not prevalidate(config)
+
+ config = {'scm': 'hg', 'url': 'https://selenic.com/hg'}
+ assert prevalidate(config)