From 1352d0d1d7e2df45054ba51d90dbf5932cc6b597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Lipt=C3=A1k?= Date: Thu, 13 Jun 2024 10:47:08 -0400 Subject: [PATCH] Correct cannot collect test class warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gábor Lipták --- dataprofiler/tests/profilers/test_histogram_utils.py | 2 ++ .../tests/profilers/test_numeric_stats_mixin_profile.py | 5 +++-- requirements.txt | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dataprofiler/tests/profilers/test_histogram_utils.py b/dataprofiler/tests/profilers/test_histogram_utils.py index 3be8cdcae..0c734c419 100644 --- a/dataprofiler/tests/profilers/test_histogram_utils.py +++ b/dataprofiler/tests/profilers/test_histogram_utils.py @@ -33,6 +33,8 @@ def mock_sqrt_return_nan(profile): class TestColumn(NumericStatsMixin): + __test__ = False + def __init__(self): NumericStatsMixin.__init__(self) self.times = defaultdict(float) diff --git a/dataprofiler/tests/profilers/test_numeric_stats_mixin_profile.py b/dataprofiler/tests/profilers/test_numeric_stats_mixin_profile.py index e112781ab..7e2ee1b8b 100644 --- a/dataprofiler/tests/profilers/test_numeric_stats_mixin_profile.py +++ b/dataprofiler/tests/profilers/test_numeric_stats_mixin_profile.py @@ -19,6 +19,8 @@ class TestColumn(NumericStatsMixin): + __test__ = False + def __init__(self): NumericStatsMixin.__init__(self) self.match_count = 0 @@ -32,6 +34,7 @@ def _filter_properties_w_options(self, calculations, options): class TestColumnWProps(TestColumn): + __test__ = False # overrides the property func median = None mode = None @@ -52,7 +55,6 @@ class TestNumericStatsMixin(unittest.TestCase): create=True, ) def test_base(self): - # validate requires NumericalOptions with self.assertRaisesRegex( ValueError, @@ -345,7 +347,6 @@ def test_timeit(self): time_array = [float(i) for i in range(24, 0, -1)] with mock.patch("time.time", side_effect=lambda: time_array.pop()): - # Validate that the times dictionary is empty self.assertEqual(defaultdict(float), num_profiler.times) diff --git a/requirements.txt b/requirements.txt index b3df933ef..8e0363923 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ h5py>=2.10.0 wheel>=0.33.1 -numpy>=1.22.0 +numpy>=1.22.0,<2.0.0 pandas>=1.1.2 python-dateutil>=2.7.5 pytz>=2020.1