testutils – Utils for Running Python Unittests

RunTests()

This function behaves as a custom TestLoader for python unittests.

With no system arguments, the default unittest TestRunner is used.

If the first system argument (sys.argv[1]) is set to ‘xml’, a XMLTestRunner is used, which produces a JUnit compatible XML output file. Within the current module, each function is identified which is a subclass of unittest.TestCase and for each TestCase, a test suite is executed, producing an individual output file for each TestCase. The output file has the name, ‘PYTEST-<TestCaseName>.xml’.

Example of a Python testcase:

import unittest

class TestRenumber(unittest.TestCase):

  def setUp(self):
    # prepare stuff"
    pass

  def testSomeFunction(self):
    # do some asserts
    pass

if __name__ == "__main__":
  from ost import testutils
  testutils.RunTests()
DefaultCompoundLibIsSet()

This function checks if a default compound library is set.

Returns:

True, if a compound library was found and set to be accessed with ost.conop.GetDefaultLib(). False otherwise.

Search

Enter search terms or a module, class or function name.

Contents

Documentation is available for the following OpenStructure versions:

dev / (Currently viewing 2.8) / 2.7 / 2.6 / 2.5 / 2.4 / 2.3.1 / 2.3 / 2.2 / 2.1 / 2.0 / 1.9 / 1.8 / 1.7.1 / 1.7 / 1.6 / 1.5 / 1.4 / 1.3 / 1.2 / 1.11 / 1.10 / 1.1

This documentation is still under heavy development!
If something is missing or if you need the C++ API description in doxygen style, check our old documentation for further information.