-
Notifications
You must be signed in to change notification settings - Fork 181
fix: rename TestColumn classes to MockColumn to fix pytest collection warnings #1200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hashwnath
wants to merge
14
commits into
capitalone:dev
Choose a base branch
from
hashwnath:fix/pytest-collection-warnings
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix: rename TestColumn classes to MockColumn to fix pytest collection warnings #1200
hashwnath
wants to merge
14
commits into
capitalone:dev
from
hashwnath:fix/pytest-collection-warnings
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* refactor: Upgrade the models to use keras 3.0 (capitalone#1138) * Replace snappy with cramjam (capitalone#1091) * add downloads tile (capitalone#1085) * Replace snappy with cramjam * Delete test_no_snappy --------- Co-authored-by: Taylor Turner <taylorfturner@gmail.com> * pre-commit fix (capitalone#1122) * Bug fix for float precision calculation using categorical data with trailing zeros. (capitalone#1125) * Revert "Bug fix for float precision calculation using categorical data with t…" (capitalone#1133) This reverts commit d3159bd. * refactor: move layers outside of class * refactor: update model to keras 3.0 * fix: manifest * fix: bugs in compile and train * fix: bug in load_from_library * fix: bugs in CharCNN * refactor: loading tf model labeler * fix: bug in data_labeler identification * fix: update model to use proper softmax layer names * fix: formatting * fix: remove unused line * refactor: drop support for 3.8 * fix: comments * fix: comment --------- Co-authored-by: Gábor Lipták <gliptak@gmail.com> Co-authored-by: Taylor Turner <taylorfturner@gmail.com> Co-authored-by: James Schadt <jamesrschadt@gmail.com> * Fix Tox (capitalone#1143) * tox new * update * update * update * update * update * update * update * update tox.ini * update * update * remove docs * empty retrigger * update (capitalone#1146) * bump version * update 3.11 * remove dist/ --------- Co-authored-by: JGSweets <JGSweets@users.noreply.github.com> Co-authored-by: Gábor Lipták <gliptak@gmail.com> Co-authored-by: James Schadt <jamesrschadt@gmail.com>
* refactor: Upgrade the models to use keras 3.0 (capitalone#1138) * Replace snappy with cramjam (capitalone#1091) * add downloads tile (capitalone#1085) * Replace snappy with cramjam * Delete test_no_snappy --------- * pre-commit fix (capitalone#1122) * Bug fix for float precision calculation using categorical data with trailing zeros. (capitalone#1125) * Revert "Bug fix for float precision calculation using categorical data with t…" (capitalone#1133) This reverts commit d3159bd. * refactor: move layers outside of class * refactor: update model to keras 3.0 * fix: manifest * fix: bugs in compile and train * fix: bug in load_from_library * fix: bugs in CharCNN * refactor: loading tf model labeler * fix: bug in data_labeler identification * fix: update model to use proper softmax layer names * fix: formatting * fix: remove unused line * refactor: drop support for 3.8 * fix: comments * fix: comment --------- * Fix Tox (capitalone#1143) * tox new * update * update * update * update * update * update * update * update tox.ini * update * update * remove docs * empty retrigger * update (capitalone#1146) * Add Python 3.11 to GHA (capitalone#1090) * add downloads tile (capitalone#1085) * Add Python 3.11 to GHA * Replace snappy with cramjam (capitalone#1091) * add downloads tile (capitalone#1085) * Replace snappy with cramjam * Delete test_no_snappy --------- * Update dask modules * Install dask dataframe * Update dask modules in precommit * Correct copy/paste error * Try again to clear Unicode * Rolled back pre-commit dask version * Add py311 to tox * Bump dask to 2024.4.1 * Bump python-snappy 0.7.1 * Rewrite labeler test * Correct isort * Satisfy black * And flake8 * Synced with requirements --------- * [Vuln Fix]: Resolve mend vulnerabilities related to requests. (capitalone#1162) * resolved check-manifest issue * updating keras version pin to <=3.4.0 * adding comment in requirements.txt to trigger mend check --------- --------- Co-authored-by: JGSweets <JGSweets@users.noreply.github.com> Co-authored-by: Gábor Lipták <gliptak@gmail.com> Co-authored-by: Taylor Turner <taylorfturner@gmail.com> Co-authored-by: James Schadt <jamesrschadt@gmail.com> Co-authored-by: Michael Davis <36012613+micdavis@users.noreply.github.com>
* chore: create publish-docs.yml * brought in docs directory
* chore: update workflow to properly install pandoc * chore: update build to build to a LATEST directory
* chore: permissions for publish-docs
…ng (capitalone#1181) * docs: add architecture.rst for algorithm rationale, testing, and versioning details * docs: remove manual table of contents from architecture.rst for Furo compatibility and edit content
* ops: drop python 3.9 (EOL) * ops: add whitesource config * fix: don't add python 3.12 yet * ops: add whitesource config to MANIFEST * fix: remove `--forked` to fix coverage * fix: remove tests that depend on `--forked` * ops: update vulnerable libraries
* ops: properly configure whitesource * ops: add whitesource config to MANIFEST
Fixes capitalone#1147 Pytest was generating collection warnings because helper classes named TestColumn and TestColumnWProps were being detected as test classes due to their 'Test' prefix, but failed collection because they have __init__ constructors. This commit renames: - TestColumn -> MockColumn - TestColumnWProps -> MockColumnWProps This makes it clear these are mock/helper classes, not test classes, and eliminates the pytest collection warnings.
9df498f to
60256a3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1147
Problem
Pytest was generating collection warnings because helper classes named
TestColumnandTestColumnWPropswere being detected as test classes due to their 'Test' prefix, but failed collection because they have__init__constructors.Solution
Renamed the helper/mock classes:
TestColumn→MockColumnTestColumnWProps→MockColumnWPropsThis makes it clear these are mock/helper classes, not test classes, and eliminates the pytest collection warnings.
Files Changed
dataprofiler/tests/profilers/test_histogram_utils.pydataprofiler/tests/profilers/test_numeric_stats_mixin_profile.pyTesting
This is a straightforward refactoring with no logic changes. All existing tests should pass.