summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen M. Webb <stephen.webb@canonical.com>2011-11-24 10:51:33 -0500
committerStephen M. Webb <stephen.webb@canonical.com>2011-11-24 10:51:33 -0500
commit5b1dd27d40217b0e53e88e240f108501c8970fb3 (patch)
tree47b291ba5318db9c78876a2ffca205aaa7965ce3
parent034a2d18ace31368fb80d4d97eb1a548db3e7479 (diff)
Fixed testsuite fail due to testsuite resource leak
-rw-r--r--python/evemu/testing/testcase.py5
-rw-r--r--python/evemu/tests/test_device.py5
2 files changed, 5 insertions, 5 deletions
diff --git a/python/evemu/testing/testcase.py b/python/evemu/testing/testcase.py
index afff94b..0301adb 100644
--- a/python/evemu/testing/testcase.py
+++ b/python/evemu/testing/testcase.py
@@ -53,6 +53,11 @@ class BaseTestCase(unittest.TestCase):
self.data_dir = os.path.join(basedir, "..", "..", "data")
self.device = None
+ def tearDown(self):
+ if self.device:
+ self.device.destroy()
+ super(BaseTestCase, self).tearDown()
+
def get_device_file(self):
return os.path.join(self.data_dir, "ntrig-dell-xt2.prop")
diff --git a/python/evemu/tests/test_device.py b/python/evemu/tests/test_device.py
index aa032b2..65112fd 100644
--- a/python/evemu/tests/test_device.py
+++ b/python/evemu/tests/test_device.py
@@ -12,11 +12,6 @@ from evemu.testing import testcase
class EvEmuDeviceTestCase(testcase.BaseTestCase):
- def tearDown(self):
- if self.device:
- self.device.destroy()
- super(EvEmuDeviceTestCase, self).tearDown()
-
def test_initialize_error_new(self):
class FakeDevice(EvEmuDevice):
def _new(self):