summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLucas Hoffmann <l-m-h@web.de>2017-06-02 11:04:39 +0200
committerLucas Hoffmann <l-m-h@web.de>2017-06-02 15:37:00 +0200
commit84a5d025d06fbcd02da5345e74cfee711367e109 (patch)
tree8398889878688ff8d4df16f9836ca755b037410b /tests
parent1b13cb38f1c425c1705fbb9e1b604b562012ce80 (diff)
downloadvdebug-84a5d025d06fbcd02da5345e74cfee711367e109.zip
Simplify test setup and remove test runner script
The tests can be run with `python -m unittest discover` instead. When run with python3 they show some deprecation warnings that where not shown before but they do not fail. Additionally this reduces the missed lines count in the test coverage report to 0 for nearly all test files.
Diffstat (limited to 'tests')
-rw-r--r--tests/__init__.py0
-rw-r--r--tests/setup.py4
-rw-r--r--tests/test_breakpoint_breakpoint.py4
-rw-r--r--tests/test_dbgp_api.py4
-rw-r--r--tests/test_dbgp_connection.py4
-rw-r--r--tests/test_dbgp_context_property.py4
-rw-r--r--tests/test_dbgp_eval_property.py4
-rw-r--r--tests/test_dbgp_response.py3
-rw-r--r--tests/test_opts_options.py4
-rw-r--r--tests/test_util_environment.py4
-rw-r--r--tests/test_util_filepath.py4
11 files changed, 13 insertions, 26 deletions
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/__init__.py
diff --git a/tests/setup.py b/tests/setup.py
new file mode 100644
index 0000000..c3d546a
--- /dev/null
+++ b/tests/setup.py
@@ -0,0 +1,4 @@
+import sys
+
+sys.path.append('tests')
+sys.path.append('pythonx')
diff --git a/tests/test_breakpoint_breakpoint.py b/tests/test_breakpoint_breakpoint.py
index dfbaa82..040ea82 100644
--- a/tests/test_breakpoint_breakpoint.py
+++ b/tests/test_breakpoint_breakpoint.py
@@ -1,6 +1,4 @@
-if __name__ == "__main__":
- import sys
- sys.path.append('pythonx')
+from . import setup
import unittest
import vdebug.breakpoint
import vdebug.error
diff --git a/tests/test_dbgp_api.py b/tests/test_dbgp_api.py
index b58885d..15eecdb 100644
--- a/tests/test_dbgp_api.py
+++ b/tests/test_dbgp_api.py
@@ -1,6 +1,4 @@
-if __name__ == "__main__":
- import sys
- sys.path.append('pythonx')
+from . import setup
import unittest
import vdebug.dbgp
from mock import MagicMock, patch
diff --git a/tests/test_dbgp_connection.py b/tests/test_dbgp_connection.py
index 1c19629..cf6d4cb 100644
--- a/tests/test_dbgp_connection.py
+++ b/tests/test_dbgp_connection.py
@@ -1,6 +1,4 @@
-if __name__ == "__main__":
- import sys
- sys.path.append('pythonx')
+from . import setup
import unittest
import vdebug.dbgp
diff --git a/tests/test_dbgp_context_property.py b/tests/test_dbgp_context_property.py
index a251ed1..637b400 100644
--- a/tests/test_dbgp_context_property.py
+++ b/tests/test_dbgp_context_property.py
@@ -1,6 +1,4 @@
-if __name__ == "__main__":
- import sys
- sys.path.append('pythonx')
+from . import setup
import unittest
import vdebug.dbgp
import xml.etree.ElementTree as ET
diff --git a/tests/test_dbgp_eval_property.py b/tests/test_dbgp_eval_property.py
index 1bf899f..bd317c7 100644
--- a/tests/test_dbgp_eval_property.py
+++ b/tests/test_dbgp_eval_property.py
@@ -1,6 +1,4 @@
-if __name__ == "__main__":
- import sys
- sys.path.append('pythonx')
+from . import setup
import unittest
import vdebug.dbgp
import xml.etree.ElementTree as ET
diff --git a/tests/test_dbgp_response.py b/tests/test_dbgp_response.py
index e343a7f..d85e844 100644
--- a/tests/test_dbgp_response.py
+++ b/tests/test_dbgp_response.py
@@ -1,6 +1,5 @@
+from . import setup
import sys
-if __name__ == "__main__":
- sys.path.append('pythonx')
import unittest
import vdebug.dbgp
import xml
diff --git a/tests/test_opts_options.py b/tests/test_opts_options.py
index 24ebd2f..47f0a33 100644
--- a/tests/test_opts_options.py
+++ b/tests/test_opts_options.py
@@ -1,6 +1,4 @@
-if __name__ == "__main__":
- import sys
- sys.path.append('pythonx')
+from . import setup
import unittest
from vdebug.opts import Options,OptionsError
diff --git a/tests/test_util_environment.py b/tests/test_util_environment.py
index b7cc646..ac9f1f9 100644
--- a/tests/test_util_environment.py
+++ b/tests/test_util_environment.py
@@ -1,6 +1,4 @@
-if __name__ == "__main__":
- import sys
- sys.path.append('pythonx')
+from . import setup
import unittest
from mock import MagicMock, patch
import vdebug.util
diff --git a/tests/test_util_filepath.py b/tests/test_util_filepath.py
index fa85ab0..7d1d970 100644
--- a/tests/test_util_filepath.py
+++ b/tests/test_util_filepath.py
@@ -1,6 +1,4 @@
-if __name__ == "__main__":
- import sys
- sys.path.append('pythonx')
+from . import setup
import unittest
import vdebug.opts
from vdebug.util import FilePath