From 36fde57654c6ab7ddec2a4ea5762a372bf28997d Mon Sep 17 00:00:00 2001 From: Cristi Dnla Date: Mon, 9 Dec 2024 16:25:28 +0200 Subject: [PATCH] Boosting numerical check in integration test --- tests/integration/test_benchmark.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/integration/test_benchmark.py b/tests/integration/test_benchmark.py index b89f2a09..40e46adb 100644 --- a/tests/integration/test_benchmark.py +++ b/tests/integration/test_benchmark.py @@ -50,6 +50,7 @@ def test_benchmark_single_table_basic_synthsizers(): ] == quality_scores.index.tolist() +@pytest.mark.skipif(sys.platform.startswith('darwin'), reason='Test not supported on github MacOS') def test_benchmark_single_table_realtabformer_no_metrics(): """Test it without metrics.""" # Run @@ -62,8 +63,8 @@ def test_benchmark_single_table_realtabformer_no_metrics(): # Assert train_time = output['Train_Time'][0] sample_time = output['Sample_Time'][0] - assert isinstance(train_time, (int, float)), 'Train_Time is not numerical' - assert isinstance(sample_time, (int, float)), 'Sample_Time is not numerical' + assert isinstance(train_time, (int, float, complex)), 'Train_Time is not numerical' + assert isinstance(sample_time, (int, float, complex)), 'Sample_Time is not numerical' assert train_time > 0 @@ -82,8 +83,10 @@ def test_benchmark_single_table_no_metrics(): assert 'Train_Time' in output assert 'Sample_Time' in output - assert isinstance(output['Train_Time'][0], (int, float)), 'Train_Time is not numerical' - assert isinstance(output['Sample_Time'][0], (int, float)), 'Sample_Time is not numerical' + assert isinstance(output['Train_Time'][0], (int, float, complex)), 'Train_Time is not numerical' + assert isinstance(output['Sample_Time'][0], (int, float, complex)), ( + 'Sample_Time is not numerical' + ) # Expect no metric columns. assert len(output.columns) == 10