6 here
= os
.path
.dirname(__file__
)
9 suite
= additional_tests()
10 loader
= unittest
.TestLoader()
11 for fn
in os
.listdir(here
):
12 if fn
.startswith("test") and fn
.endswith(".py"):
13 modname
= "json.tests." + fn
[:-3]
15 module
= sys
.modules
[modname
]
16 suite
.addTests(loader
.loadTestsFromModule(module
))
19 def additional_tests():
23 suite
= unittest
.TestSuite()
24 for mod
in (json
, json
.encoder
, json
.decoder
):
25 suite
.addTest(doctest
.DocTestSuite(mod
))
30 runner
= unittest
.TextTestRunner()
33 if __name__
== '__main__':
34 sys
.path
.insert(0, os
.path
.dirname(os
.path
.dirname(os
.path
.dirname(os
.path
.abspath(__file__
)))))