Commit f102fc5f authored by Georg Brandl's avatar Georg Brandl

Add test_main() methods. These three tests were never run

by regrtest.py.

We really need a simpler testing framework.
parent 9aed98fe
......@@ -4,6 +4,7 @@ import os
import copy
import tempfile
import unittest
from test import test_support
from collections import defaultdict
......@@ -131,5 +132,8 @@ class TestDefaultDict(unittest.TestCase):
self.assertEqual(d2, d1)
def test_main():
test_support.run_unittest(TestDefaultDict)
if __name__ == "__main__":
unittest.main()
test_main()
......@@ -235,9 +235,7 @@ class TestSeqIterReversed(TestInvariantWithoutMutations):
self.assertEqual(len(it), 0)
if __name__ == "__main__":
def test_main():
unittests = [
TestRepeat,
TestXrange,
......@@ -255,3 +253,7 @@ if __name__ == "__main__":
TestSeqIterReversed,
]
test_support.run_unittest(*unittests)
if __name__ == "__main__":
test_main()
from unittest import TestCase, main
from unittest import TestCase
from test import test_support
import uuid
def importable(name):
......@@ -392,5 +393,9 @@ class TestUUID(TestCase):
equal(u, uuid.UUID(v))
equal(str(u), v)
def test_main():
test_support.run_unittest(TestUUID)
if __name__ == '__main__':
main()
test_main()
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