anise.features.testing_ package

Submodules

anise.features.testing_.generic module

Feature for generic unit testing.

anise.features.testing_.generic.generictest(testrun, command)

Runs an external command as test and interpret it as successful, if the exit code is 0.

Parameters
  • testrun (testing.Internals.TestRun) – A test run.

  • command (List[str]) – The external command (as list of arguments).

Return type

None

anise.features.testing_.pytest module

Feature for unit testing with pyunit.

anise.features.testing_.pytest.pytesttests(testrun, testdir=None)

Runs all pytest tests in the project. The discovery is done automatically.

Parameters
  • testrun (testing.Internals.TestRun) – A test run.

  • testdir (Optional[str]) – The root directory where to look for tests.

Return type

None

anise.features.testing_.pyunit module

Feature for unit testing with pyunit.

anise.features.testing_.pyunit.pyunittest(testrun, testclass, testdir=None)

Runs an pyunit test.

Parameters
  • testrun (testing.Internals.TestRun) – A test run.

  • testdir (Optional[str]) – The root directory where to look for tests.

  • testclass (str) – The name of the test class.

Return type

None

anise.features.testing_.pyunit.pyunittests(testrun, testdir=None, filepattern='*.py')

Runs all pyunit tests in the project (or all that fulfill specified patterns). The discovery is done automatically.

Parameters
  • testrun (testing.Internals.TestRun) – A test run.

  • testdir (Optional[str]) – The root directory where to look for tests.

  • filepattern (str) – A file pattern describing which files to inspect.

Return type

None

Module contents

Inner module for anise.features.testing.