From 7fbce6c96ad9b7b3ab2715a8c83f54d8645b8af7 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 27 Oct 2013 17:52:50 +0000 Subject: [PATCH] Add testing requirements and update tests to unittest2. --- setup.py | 1 + ts3/test.py | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index dd2e0a9..027aba8 100755 --- a/setup.py +++ b/setup.py @@ -14,6 +14,7 @@ setup( packages=['ts3'], scripts=['examples/gents3privkey.py'], test_suite='ts3.test.suite', + test_require=['unittest2'], classifiers=[ 'License :: OSI Approved :: BSD License', diff --git a/ts3/test.py b/ts3/test.py index a995b29..debc602 100644 --- a/ts3/test.py +++ b/ts3/test.py @@ -1,7 +1,8 @@ -import unittest -from .protocol import TS3Proto +import unittest2 +from ts3.protocol import TS3Proto -class TS3ProtoTest(unittest.TestCase): + +class TS3ProtoTest(unittest2.TestCase): """ Tests the TS3Proto class """ def setUp(self): @@ -66,9 +67,9 @@ class TS3ProtoTest(unittest.TestCase): def suite(): - suite = unittest.TestSuite() - suite.addTest(unittest.makeSuite(TS3ProtoTest)) + suite = unittest2.TestSuite() + suite.addTest(unittest2.makeSuite(TS3ProtoTest)) return suite if __name__ == '__main__': - unittest.main() + unittest2.main()