comparison tests/silenttestrunner.py @ 28729:fc2268b9a07c

py3: use absolute_import in silenttestrunner.py
author Robert Stanca <robert.stanca7@gmail.com>
date Sat, 02 Apr 2016 18:16:12 +0300
parents dadcd40b62d8
children 73437077753c
comparison
equal deleted inserted replaced
28728:8699c89f3ae9 28729:fc2268b9a07c
1 import unittest, sys, os 1 from __future__ import absolute_import
2 import unittest
3 import sys
4 import os
2 5
3 def main(modulename): 6 def main(modulename):
4 '''run the tests found in module, printing nothing when all tests pass''' 7 '''run the tests found in module, printing nothing when all tests pass'''
5 module = sys.modules[modulename] 8 module = sys.modules[modulename]
6 suite = unittest.defaultTestLoader.loadTestsFromModule(module) 9 suite = unittest.defaultTestLoader.loadTestsFromModule(module)