Ejemplo n.º 1
0
def suite():
    """Unit test suite; run by testing 'parcels.osaf.sharing.tests.suite'"""
    from run_tests import ScanningLoader
    from unittest import defaultTestLoader, TestSuite
    loader = ScanningLoader()
    return TestSuite([
        loader.loadTestsFromName(__name__ + '.' + test_name)
        for test_name in __all__
    ])
Ejemplo n.º 2
0
def suite():
    """Unit test suite; run by testing 'parcels.osaf.sharing.tests.suite'"""
    from run_tests import ScanningLoader
    from unittest import defaultTestLoader, TestSuite
    loader = ScanningLoader()
    return TestSuite(
        [loader.loadTestsFromName(__name__+'.'+test_name)
            for test_name in __all__]
    )
Ejemplo n.º 3
0
def suite():
    """Unit test suite; run by testing 'parcels.osaf.sharing.tests.suite'"""
    from run_tests import ScanningLoader
    from unittest import defaultTestLoader, TestSuite
    loader = ScanningLoader()
    return TestSuite(
        [loader.loadTestsFromName(__name__+'.'+test_name)
            for test_name in [
                'TimeZoneTestCase',
                'DefaultTimeZoneTestCase',
                'KnownTimeZonesTestCase']]
    )
Ejemplo n.º 4
0
        path = "//parcels/%s/" % this_module.replace('.','/')
        self.assertNotEqual( rv.findPath(path+'Dummy'), None)
        self.assertNotEqual( rv.findPath(path+'AnEnum'), None)


def test_schema_api():
    import doctest
    return doctest.DocFileSuite(
        'schema_api.txt', optionflags=doctest.ELLIPSIS, package='application',
    )


def additional_tests():
    return unittest.TestSuite(
        [ test_schema_api(), ]
    )


if __name__=='__main__':
    # This module can't be safely run as __main__, so it has to be re-imported
    # and have *that* copy run.
    from run_tests import ScanningLoader
    unittest.main(
        module=None, testLoader = ScanningLoader(),
        argv=["unittest", this_module]
    )
else:
    assert __name__ == this_module, (
        "This module must be installed in its designated location"
    )