DataProfiler icon indicating copy to clipboard operation
DataProfiler copied to clipboard

fix: rename TestColumn classes to MockColumn to fix pytest collection warnings

Open hashwnath opened this issue 10 months ago • 3 comments

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:

  • TestColumn → MockColumn
  • TestColumnWProps → MockColumnWProps

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.

hashwnath avatar Jan 20 '26 02:01 hashwnath

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jan 20 '26 02:01 CLAassistant

Please resolve the merge conflicts

shania-m avatar Feb 24 '26 23:02 shania-m

Hi Shania, Just fixed the merge conflicts with the latest dev

hashwnath avatar Feb 25 '26 02:02 hashwnath