OPAL (Object Oriented Parallel Accelerator Library)  2024.1
OPAL
Public Member Functions | List of all members
encapsulated_test_case.EncapsulatedTestCase Class Reference

Inherits TestCase.

Public Member Functions

def test_run_encapsulated
 

Detailed Description

Because OPAL is sloppy with memory, we run many tests in a forked process.
This is done by using EncapsulatedTestCase instead of the regular unittest
TestCase.

TestCases should inherit from this class. By default make install will put
the class in pyopal.objects. Individual test methods should have a name like
"encapsulated_test_<name>" to indicate that the method needs to be run in a
forked process. EncapsulatedTestCase will search for these tests at run time
and execute them.

Definition at line 21 of file encapsulated_test_case.py.

Member Function Documentation

def encapsulated_test_case.EncapsulatedTestCase.test_run_encapsulated (   self)
Search through the methods and look for functions with name
"encapsulated_test_<name>". If one is found, it will be executed in a
forked process.

This method replaces all of the encapsulated_test_<name> methods, so if
multiple iterations fail it still gets counted as a single failure.

Definition at line 33 of file encapsulated_test_case.py.


The documentation for this class was generated from the following file: