summaryrefslogtreecommitdiff
path: root/tests/test_mainloop.py
diff options
context:
space:
mode:
authorSimon van der Linden <svdlinden@gnome.org>2010-07-28 14:56:00 +0200
committerTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2010-07-29 13:46:35 +0200
commit0a9f1da052fd33dcef81d0e267fc7972f02c7888 (patch)
tree0aef5e74328ff22b8b904b2020d295fd76323e22 /tests/test_mainloop.py
parent82f4cb5ebf5d992493b7a2f74cfd5f175e19eb76 (diff)
downloadpygobject-0a9f1da052fd33dcef81d0e267fc7972f02c7888.tar.gz
Clean and improve the test infrastructure
To run select tests, use for instance: % make check TEST_NAMES='test_everything test_gi.TestConstant' It works with check.gdb and check.valgrind too. https://bugzilla.gnome.org/show_bug.cgi?id=625488
Diffstat (limited to 'tests/test_mainloop.py')
-rw-r--r--tests/test_mainloop.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/test_mainloop.py b/tests/test_mainloop.py
index 95e5f789..4286d137 100644
--- a/tests/test_mainloop.py
+++ b/tests/test_mainloop.py
@@ -1,12 +1,12 @@
-#!/usr/bin/env python
+# -*- Mode: Python -*-
-import exceptions
import os
import sys
import select
import unittest
-from common import glib
+import glib
+
class TestMainLoop(unittest.TestCase):
def testExceptionHandling(self):
@@ -31,7 +31,7 @@ class TestMainLoop(unittest.TestCase):
os.close(pipe_w)
def excepthook(type, value, traceback):
- assert type is exceptions.Exception
+ assert type is Exception
assert value.args[0] == "deadbabe"
sys.excepthook = excepthook
@@ -48,6 +48,3 @@ class TestMainLoop(unittest.TestCase):
#
sys.excepthook = sys.__excepthook__
assert not got_exception
-
-if __name__ == '__main__':
- unittest.main()