Skip to content

Testing: test_log2d.cleanup() does not work as expected/required #16

@MikeDP

Description

@MikeDP

(Re)Work on find is complete pending testing but this has highlighted an issue with test_log2d.cleanup() which may impact testing in other areas besides find.

In cleanup(), logging.shutdown() does not have the anticipated effect of re-initialising logging. In particular, after shutdown(), logging still contains handlers which end up affecting subsequent Log instances. Thus, the order in which tests are carried out affects the test results.

This is a design feature of logging.shutdown() which is really meant to be used just before application exit: See this from stackoverflow and Python logging docs.

I will look for a solution but (as always) need to learn more about logging first.

Mike

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions