4
from nose.plugins.isolate import IsolationPlugin
5
from nose.plugins import PluginTester
7
support = os.path.join(os.path.dirname(__file__), 'support')
9
class TestDiscovery(PluginTester, unittest.TestCase):
10
activate = '--with-isolation'
12
plugins = [IsolationPlugin()]
13
suitepath = os.path.join(support, 'ipt')
16
print str(self.output)
18
for line in self.output:
21
if line.startswith('-'):
23
assert line.strip().endswith('ok'), \
24
"Failed test: %s" % line.strip()
27
class TestLoadFromNames(PluginTester, unittest.TestCase):
28
activate = '--with-isolation'
29
args = ['-v', 'test1/tests.py', 'test2/tests.py']
30
plugins = [IsolationPlugin()]
34
self._dir = os.getcwd()
35
os.chdir(os.path.join(support, 'ipt'))
36
super(TestLoadFromNames, self).setUp()
40
super(TestLoadFromNames, self).tearDown()
46
print str(self.output)
48
for line in self.output:
51
if line.startswith('-'):
53
assert line.strip().endswith('ok'), \
54
"Failed test: %s" % line.strip()
56
if __name__ == '__main__':