- commit
- d0c680b0280e599cd2c4473e258bc7d79b5a5018
- parent
- e9d8f9b1b6d2f3c95eed1ff5117df76be46e6ed0
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2018-08-03 11:39
cleanup tests
Diffstat
| D | tests/shared.py | 11 | ----------- |
| M | tests/shared_core.py | 5 | ++--- |
| M | tests/test_curses.py | 5 | ++--- |
| M | tests/test_pygame.py | 5 | ++--- |
| M | tests/test_stupid.py | 12 | ++---------- |
| M | tox.ini | 20 | +++----------------- |
6 files changed, 11 insertions, 47 deletions
diff --git a/tests/shared.py b/tests/shared.py
@@ -1,11 +0,0 @@1 -1 # flake8: noqa2 -13 -1 try:4 -1 import unittest2 as unittest5 -1 except ImportError:6 -1 import unittest7 -18 -1 try:9 -1 from pykeyboard import PyKeyboard10 -1 except ImportError:11 -1 PyKeyboard = None
diff --git a/tests/shared_core.py b/tests/shared_core.py
@@ -1,10 +1,10 @@ 1 1 from __future__ import absolute_import 2 2 3 3 import threading -1 4 import unittest 4 5 from time import sleep 5 66 -1 from .shared import unittest7 -1 from .shared import PyKeyboard-1 7 from pykeyboard import PyKeyboard 8 8 9 9 from dirtywords.constants import KEYS 10 10 @@ -25,7 +25,6 @@ class KeyboardUser(threading.Thread): 25 25 self.k.tap_key(key) 26 26 27 2728 -1 @unittest.skipIf(PyKeyboard is None, 'PyUserInput not available')29 28 class TestCore(unittest.TestCase): 30 29 def setUp(self): 31 30 self.k = PyKeyboard()
diff --git a/tests/test_curses.py b/tests/test_curses.py
@@ -1,7 +1,7 @@ 1 1 from __future__ import absolute_import 2 23 -1 from .shared import unittest4 -1 from .shared import PyKeyboard-1 3 import unittest -1 4 5 5 from . import shared_core 6 6 7 7 try: @@ -12,7 +12,6 @@ except ImportError: 12 12 13 13 14 14 @unittest.skipIf(curses is None, 'curses not available')15 -1 @unittest.skipIf(PyKeyboard is None, 'PyUserInput not available')16 15 class TestCurses(shared_core.TestCore): 17 16 def setUp(self): 18 17 super(TestCurses, self).setUp()
diff --git a/tests/test_pygame.py b/tests/test_pygame.py
@@ -1,7 +1,7 @@ 1 1 from __future__ import absolute_import 2 23 -1 from .shared import unittest4 -1 from .shared import PyKeyboard-1 3 import unittest -1 4 5 5 from . import shared_core 6 6 7 7 try: @@ -12,7 +12,6 @@ except ImportError: 12 12 13 13 14 14 @unittest.skipIf(pygame is None, 'pygame not available')15 -1 @unittest.skipIf(PyKeyboard is None, 'PyUserInput not available')16 15 class TestPygame(shared_core.TestCore): 17 16 def setUp(self): 18 17 super(TestPygame, self).setUp()
diff --git a/tests/test_stupid.py b/tests/test_stupid.py
@@ -1,18 +1,10 @@ 1 1 from __future__ import absolute_import 2 23 -1 from .shared import unittest4 -1 from .shared import PyKeyboard5 -1 from . import shared_core-1 3 from dirtywords.stupid import Screen 6 47 -1 try:8 -1 from dirtywords.stupid import Screen9 -1 stupid = True10 -1 except ImportError:11 -1 stupid = None-1 5 from . import shared_core 12 6 13 714 -1 @unittest.skipIf(stupid is None, 'stupid not available')15 -1 @unittest.skipIf(PyKeyboard is None, 'PyUserInput not available')16 8 class TestStupid(shared_core.TestCore): 17 9 def setUp(self): 18 10 super(TestStupid, self).setUp()
diff --git a/tox.ini b/tox.ini
@@ -4,29 +4,15 @@ 4 4 # and then run "tox" from this directory. 5 5 6 6 [tox]7 -1 envlist = py26, py27, py34-1 7 envlist = py27, py3 8 8 9 9 [testenv] 10 10 commands = 11 11 flake812 -1 python /usr/bin/nosetests-1 12 nosetests 13 13 deps = 14 14 PyUserInput 15 15 flake8 16 16 nose 17 17 coverage18 -119 -1 [testenv:py26]20 -1 deps =21 -1 flake822 -1 nose23 -1 coverage24 -1 unittest225 -126 -1 [testenv:py34]27 -1 deps =28 -1 python3-xlib29 -1 PyUserInput30 -1 flake831 -1 nose32 -1 coverage-1 18 pygame