Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Packaged tests for running as a suite

Also added travis CI file and pip requirements.txt
  • Loading branch information...
commit 44f69d8b0be4ecbbecf6dbbd97b04a7029c9fd92 1 parent d102c7c
@joonty authored
View
9 .travis.xml
@@ -0,0 +1,9 @@
+language: python
+python:
+ - "2.6"
+ - "2.7"
+ - "3.2"
+# command to install dependencies
+install: "pip install -r requirements.txt --use-mirrors"
+# command to run tests
+script: vdebugtests
View
2  requirements.txt
@@ -0,0 +1,2 @@
+unittest
+mock
View
5 tests/test_breakpoint_breakpoint.py
@@ -1,5 +1,6 @@
-import sys
-sys.path.append('../plugin/python/')
+if __name__ == "__main__":
+ import sys
+ sys.path.append('../plugin/python/')
import unittest
import vdebug.breakpoint
import vdebug.util
View
5 tests/test_dbgp_api.py
@@ -1,5 +1,6 @@
-import sys
-sys.path.append('../plugin/python/')
+if __name__ == "__main__":
+ import sys
+ sys.path.append('../plugin/python/')
import unittest
import vdebug.dbgp
from mock import MagicMock, patch
View
5 tests/test_dbgp_connection.py
@@ -1,5 +1,6 @@
-import sys
-sys.path.append('../plugin/python')
+if __name__ == "__main__":
+ import sys
+ sys.path.append('../plugin/python/')
import unittest
import vdebug.dbgp
View
5 tests/test_dbgp_context_property.py
@@ -1,5 +1,6 @@
-import sys
-sys.path.append('../plugin/python')
+if __name__ == "__main__":
+ import sys
+ sys.path.append('../plugin/python/')
import unittest
import vdebug.dbgp
import xml.etree.ElementTree as ET
View
7 tests/test_dbgp_response.py
@@ -1,5 +1,6 @@
-import sys
-sys.path.append('../plugin/python')
+if __name__ == "__main__":
+ import sys
+ sys.path.append('../plugin/python/')
import unittest
import vdebug.dbgp
import xml
@@ -198,8 +199,6 @@ class ContextGetAlternateTest(unittest.TestCase):
def test_properties_are_objects(self):
res = vdebug.dbgp.ContextGetResponse(self.response,"","",Mock())
context = res.get_context()
- p = context[0]
- print "Display name: "+p.display_name
assert len(context) == 3
self.assertIsInstance(context[0],vdebug.dbgp.ContextProperty)
View
5 tests/test_opts_options.py
@@ -1,5 +1,6 @@
-import sys
-sys.path.append('../plugin/python')
+if __name__ == "__main__":
+ import sys
+ sys.path.append('../plugin/python/')
import unittest
from vdebug.opts import Options,OptionsError
View
5 tests/test_util_filepath.py
@@ -1,5 +1,6 @@
-import sys
-sys.path.append('../plugin/python')
+if __name__ == "__main__":
+ import sys
+ sys.path.append('../plugin/python/')
import unittest
""" Mock vim import """
import vdebug.opts
View
12 vdebugtests.py
@@ -0,0 +1,12 @@
+import unittest
+import sys
+
+sys.path.append('tests')
+sys.path.append('plugin/python')
+vdebugLoader = unittest.TestLoader()
+suites = vdebugLoader.discover('tests','test_*.py')
+result = unittest.TextTestRunner().run(suites)
+if result.failures:
+ exit(1)
+elif result.errors:
+ exit(2)
Please sign in to comment.
Something went wrong with that request. Please try again.