Skip to content

Fix Testcase Class Setup/Teardown w/ MPI #74

Description

@naylor-b

Note that a similar bug exists with setUpModule/tearDownModule when used with MPI.

Reported by @sebasgo to naylor-b/testflo:

testflo sets _tcase_fixture_first and _tcase_fixture_last to its intended state during the test case discovery. This way, testflo ensures setUpClass() and tearDownClass() is only called for first or last test in a test class, respectively.

With MPI enabled, each test is run in its own process which instantiates new test instances where these attributes are kept at their default value (False). So setUpClass and tearDownClass are never executed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions