Commit f45eb5ac authored by Luke Macken's avatar Luke Macken

Remove the unittest requirement to avoid the mess on py2.6 and below.

This will hopefully get 2.5-3.3 working on travis-ci, as nose should be able to
discover everything just fine.
parent e02eaabe
...@@ -22,10 +22,10 @@ import subprocess ...@@ -22,10 +22,10 @@ import subprocess
import pyrasite import pyrasite
from pyrasite.tests.utils import generate_program, run_program, stop_program, \ from pyrasite.tests.utils import generate_program, run_program, stop_program, \
interpreters, unittest interpreters
class TestCodeInjection(unittest.TestCase): class TestCodeInjection(object):
def assert_output_contains(self, stdout, stderr, text): def assert_output_contains(self, stdout, stderr, text):
assert text in str(stdout), \ assert text in str(stdout), \
...@@ -81,5 +81,3 @@ class TestCodeInjection(unittest.TestCase): ...@@ -81,5 +81,3 @@ class TestCodeInjection(unittest.TestCase):
finally: finally:
os.unlink(program) os.unlink(program)
if __name__ == '__main__':
unittest.main()
...@@ -19,10 +19,10 @@ import os ...@@ -19,10 +19,10 @@ import os
import sys import sys
import pyrasite import pyrasite
from pyrasite.tests.utils import run_program, generate_program, stop_program, unittest from pyrasite.tests.utils import run_program, generate_program, stop_program
class TestIPCContextManager(unittest.TestCase): class TestIPCContextManager(object):
def setUp(self): def setUp(self):
self.prog = generate_program() self.prog = generate_program()
...@@ -46,7 +46,7 @@ class TestIPCContextManager(unittest.TestCase): ...@@ -46,7 +46,7 @@ class TestIPCContextManager(unittest.TestCase):
pyrasite.tests.context_manager_case.context_manager_business(self) pyrasite.tests.context_manager_case.context_manager_business(self)
class TestIPC(unittest.TestCase): class TestIPC(object):
def setUp(self): def setUp(self):
self.prog = generate_program() self.prog = generate_program()
...@@ -92,5 +92,3 @@ class TestIPC(unittest.TestCase): ...@@ -92,5 +92,3 @@ class TestIPC(unittest.TestCase):
assert repr(self.ipc) assert repr(self.ipc)
if __name__ == '__main__':
unittest.main()
...@@ -22,11 +22,6 @@ import time ...@@ -22,11 +22,6 @@ import time
import textwrap import textwrap
import tempfile import tempfile
import subprocess import subprocess
import unittest
if sys.version_info[0] == 2:
if sys.version_info[1] < 7:
import unittest2 as unittest
def generate_program(threads=1): def generate_program(threads=1):
......
...@@ -26,9 +26,6 @@ elif sys.version_info[0] == 2: ...@@ -26,9 +26,6 @@ elif sys.version_info[0] == 2:
requirements.append('argparse') requirements.append('argparse')
tests_require = ['nose'] tests_require = ['nose']
if sys.version_info[0] == 2:
if sys.version_info[1] < 7:
tests_require.append('unittest2')
class build_py(_build_py): class build_py(_build_py):
def run(self): def run(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment