O
Oltmans
Hi Python gurus,
I'm quite new to Python and have a problem. Following code resides in
a file named test.py
---
import unittest
class result(unittest.TestResult):
pass
class tee(unittest.TestCase):
def test_first(self):
print 'first test'
print '-------------'
def test_second(self):
print 'second test'
print '-------------'
def test_final(self):
print 'final method'
print '-------------'
r = result()
suite = unittest.defaultTestLoader.loadTestsFromName('test.tee')
suite.run(r)
---
Following is the output when I run it
---
final method
-------------
first test
-------------
second test
-------------
final method
I'm quite new to Python and have a problem. Following code resides in
a file named test.py
---
import unittest
class result(unittest.TestResult):
pass
class tee(unittest.TestCase):
def test_first(self):
print 'first test'
print '-------------'
def test_second(self):
print 'second test'
print '-------------'
def test_final(self):
print 'final method'
print '-------------'
r = result()
suite = unittest.defaultTestLoader.loadTestsFromName('test.tee')
suite.run(r)
---
Following is the output when I run it
---
final method
-------------
first test
-------------
second test
-------------
final method