Tests: class prefix made optional.
This commit is contained in:
@@ -31,10 +31,14 @@ class TestUnit(unittest.TestCase):
|
|||||||
|
|
||||||
TestUnit._set_args(args)
|
TestUnit._set_args(args)
|
||||||
|
|
||||||
@staticmethod
|
@classmethod
|
||||||
def main():
|
def main(cls):
|
||||||
args, rest = TestUnit._parse_args()
|
args, rest = TestUnit._parse_args()
|
||||||
|
|
||||||
|
for i, arg in enumerate(rest):
|
||||||
|
if arg[:5] == 'test_':
|
||||||
|
rest[i] = cls.__name__ + '.' + arg
|
||||||
|
|
||||||
sys.argv = sys.argv[:1] + rest
|
sys.argv = sys.argv[:1] + rest
|
||||||
|
|
||||||
TestUnit._set_args(args)
|
TestUnit._set_args(args)
|
||||||
|
|||||||
Reference in New Issue
Block a user