Added sub-tests for a python2 input file.
This commit is contained in:
parent
7829bad0ec
commit
4752f0d735
13 changed files with 64 additions and 10 deletions
4
golden-files/input/hi.py
Normal file
4
golden-files/input/hi.py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
|
||||
def hi():
|
||||
print "hi"
|
||||
15
golden-files/input/hi_test.py
Normal file
15
golden-files/input/hi_test.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
|
||||
import unittest
|
||||
|
||||
import hi
|
||||
|
||||
|
||||
class HiTestCase(unittest.TestCase):
|
||||
|
||||
def test_hi(self):
|
||||
hi.hi()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
0
golden-files/results/pep8-hi_py
Normal file
0
golden-files/results/pep8-hi_py
Normal file
12
golden-files/results/pydoc-hi_py
Normal file
12
golden-files/results/pydoc-hi_py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Help on module hi:
|
||||
|
||||
NAME
|
||||
hi
|
||||
|
||||
FILE
|
||||
/home/ahamilton/code/vigil/golden-files/input/hi.py
|
||||
|
||||
FUNCTIONS
|
||||
hi()
|
||||
|
||||
|
||||
0
golden-files/results/pyflakes-hi_py
Normal file
0
golden-files/results/pyflakes-hi_py
Normal file
1
golden-files/results/pylint-hi_py
Normal file
1
golden-files/results/pylint-hi_py
Normal file
|
|
@ -0,0 +1 @@
|
|||
No config file found, using default configuration
|
||||
4
golden-files/results/python_coverage-hi_py
Normal file
4
golden-files/results/python_coverage-hi_py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[0m[38;2;255;255;255m[48;2;0;0;0m
|
||||
|
||||
[0m[38;2;0;255;0m[48;2;0;0;0m> def hi():[0m[38;2;255;255;255m[48;2;0;0;0m
|
||||
[0m[38;2;0;255;0m[48;2;0;0;0m> print "hi"[0m
|
||||
2
golden-files/results/python_gut-hi_py
Normal file
2
golden-files/results/python_gut-hi_py
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[0m[38;2;106;184;37m[48;2;0;0;0m[1mdef[0m[38;2;208;208;208m[48;2;0;0;0m [0m[38;2;68;127;207m[48;2;0;0;0mhi[0m[38;2;208;208;208m[48;2;0;0;0m():[0m[38;2;255;255;255m[48;2;0;0;0m
|
||||
[0m
|
||||
1
golden-files/results/python_mccabe-hi_py
Normal file
1
golden-files/results/python_mccabe-hi_py
Normal file
|
|
@ -0,0 +1 @@
|
|||
("3:1: 'hi'", 2)
|
||||
4
golden-files/results/python_modulefinder-hi_py
Normal file
4
golden-files/results/python_modulefinder-hi_py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
Name File
|
||||
---- ----
|
||||
m __main__ ./input/hi.py
|
||||
0
golden-files/results/python_syntax-hi_py
Normal file
0
golden-files/results/python_syntax-hi_py
Normal file
1
golden-files/results/python_unittests-hi_py
Normal file
1
golden-files/results/python_unittests-hi_py
Normal file
|
|
@ -0,0 +1 @@
|
|||
No tests.
|
||||
|
|
@ -68,37 +68,47 @@ class ToolsTestCase(unittest.TestCase):
|
|||
self._sub_tests([(tools.contents, "hi3.py", tools.Status.normal)])
|
||||
|
||||
def test_python_syntax(self):
|
||||
self._sub_tests([(tools.python_syntax, "hi3.py", tools.Status.ok)])
|
||||
self._sub_tests([(tools.python_syntax, "hi3.py", tools.Status.ok),
|
||||
(tools.python_syntax, "hi.py", tools.Status.ok)])
|
||||
|
||||
def test_unittests(self):
|
||||
self._sub_tests([
|
||||
(tools.python_unittests, "hi3.py", tools.Status.not_applicable)])
|
||||
(tools.python_unittests, "hi3.py", tools.Status.not_applicable),
|
||||
(tools.python_unittests, "hi.py", tools.Status.not_applicable)])
|
||||
|
||||
def test_pydoc(self):
|
||||
self._sub_tests([(tools.pydoc, "hi3.py", tools.Status.normal)])
|
||||
self._sub_tests([(tools.pydoc, "hi3.py", tools.Status.normal),
|
||||
(tools.pydoc, "hi.py", tools.Status.normal)])
|
||||
|
||||
def test_python_coverage(self):
|
||||
self._sub_tests([
|
||||
(tools.python_coverage, "hi3.py", tools.Status.normal)])
|
||||
(tools.python_coverage, "hi3.py", tools.Status.normal),
|
||||
(tools.python_coverage, "hi.py", tools.Status.normal)])
|
||||
|
||||
def test_pep8(self):
|
||||
self._sub_tests([(tools.pep8, "hi3.py", tools.Status.ok)])
|
||||
self._sub_tests([(tools.pep8, "hi3.py", tools.Status.ok),
|
||||
(tools.pep8, "hi.py", tools.Status.ok)])
|
||||
|
||||
def test_pyflakes(self):
|
||||
self._sub_tests([(tools.pyflakes, "hi3.py", tools.Status.ok)])
|
||||
self._sub_tests([(tools.pyflakes, "hi3.py", tools.Status.ok),
|
||||
(tools.pyflakes, "hi.py", tools.Status.ok)])
|
||||
|
||||
def test_pylint(self):
|
||||
self._sub_tests([(tools.pylint, "hi3.py", tools.Status.ok)])
|
||||
self._sub_tests([(tools.pylint, "hi3.py", tools.Status.ok),
|
||||
(tools.pylint, "hi.py", tools.Status.ok)])
|
||||
|
||||
def test_python_gut(self):
|
||||
self._sub_tests([(tools.python_gut, "hi3.py", tools.Status.normal)])
|
||||
self._sub_tests([(tools.python_gut, "hi3.py", tools.Status.normal),
|
||||
(tools.python_gut, "hi.py", tools.Status.normal)])
|
||||
|
||||
def test_python_modulefinder(self):
|
||||
self._sub_tests([
|
||||
(tools.python_modulefinder, "hi3.py", tools.Status.normal)])
|
||||
(tools.python_modulefinder, "hi3.py", tools.Status.normal),
|
||||
(tools.python_modulefinder, "hi.py", tools.Status.normal)])
|
||||
|
||||
def test_python_mccable(self):
|
||||
self._sub_tests([(tools.python_mccabe, "hi3.py", tools.Status.ok)])
|
||||
self._sub_tests([(tools.python_mccabe, "hi3.py", tools.Status.ok),
|
||||
(tools.python_mccabe, "hi.py", tools.Status.ok)])
|
||||
|
||||
def test_perl_syntax(self):
|
||||
self._sub_tests([(tools.perl_syntax, "perl.pl", tools.Status.ok)])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue