Skip to content

Cleanup warnings when collecting tests - #7914

Merged
ericspod merged 3 commits into
Project-MONAI:devfrom
hjmjohnson:cleanup-pytest-collection
Jul 24, 2024
Merged

ericspod merged 3 commits into
Project-MONAI:devfrom
hjmjohnson:cleanup-pytest-collection

Conversation

@hjmjohnson

Copy link
Copy Markdown
Contributor

Minimize warning information so that important warnings and errors are more easily accessible

warnings identified with

python3  -W ignore::DeprecationWarning -m pytest -k dummy

Fixing warnings like:
cannot collect test class 'TestTimeAugmentation' because it has a init constructor

Use __test__ = False to suppress attempted collection in those non test-classes

Description

A few sentences describing the changes proposed in this pull request.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.

Minimize warning information so that important warnings and errors
are more easily accessible

warnings identified with
```bash
python3  -W ignore::DeprecationWarning -m pytest -k dummy
```

Fixing warnings like:
cannot collect test class 'TestTimeAugmentation' because it has a
__init__ constructor

Use `__test__ = False` to supress attempted collection in those
non test-classes

Signed-off-by: Hans Johnson <hans-johnson@uiowa.edu>
Comment thread monai/data/test_time_augmentation.py
@ericspod
ericspod enabled auto-merge (squash) July 18, 2024 12:42
@KumoLiu

KumoLiu commented Jul 24, 2024

Copy link
Copy Markdown
Contributor

/build

@ericspod
ericspod merged commit 12d00ce into Project-MONAI:dev Jul 24, 2024
@hjmjohnson
hjmjohnson deleted the cleanup-pytest-collection branch March 11, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants