Skip to content

Conversation

@hashwnath
Copy link

Summary

Fixes #1147

Problem

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.

PytestCollectionWarning: cannot collect test class 'TestColumn' 
because it has a __init__ constructor

Solution

Renamed the helper/mock classes:

  • TestColumnMockColumn
  • TestColumnWPropsMockColumnWProps

This 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.py
  • dataprofiler/tests/profilers/test_numeric_stats_mixin_profile.py

Testing

This is a straightforward refactoring with no logic changes. All existing tests should pass.

taylorfturner and others added 13 commits June 14, 2024 13:11
* 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
@hashwnath hashwnath requested a review from a team as a code owner January 20, 2026 02:10
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.
@hashwnath hashwnath force-pushed the fix/pytest-collection-warnings branch from 9df498f to 60256a3 Compare January 20, 2026 02:30
@CLAassistant
Copy link

CLAassistant commented Jan 20, 2026

CLA assistant check
All committers have signed the CLA.

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.

7 participants