From ef2496098c742c0072ae8f81c689e533b9c4800f Mon Sep 17 00:00:00 2001 From: janezd Date: Fri, 4 Oct 2024 11:29:45 +0200 Subject: [PATCH] Rename test_pandas to test_pandas_compat to enable breakpoint in PyCharm. See https://youtrack.jetbrains.com/issue/PY-70408/Debugger-skips-all-breakpoints-in-a-single-test-file#focus=Comments-27-10794878.0-0 --- .../data/tests/{test_pandas.py => test_pandas_compat.py} | 7 +++++++ 1 file changed, 7 insertions(+) rename Orange/data/tests/{test_pandas.py => test_pandas_compat.py} (99%) diff --git a/Orange/data/tests/test_pandas.py b/Orange/data/tests/test_pandas_compat.py similarity index 99% rename from Orange/data/tests/test_pandas.py rename to Orange/data/tests/test_pandas_compat.py index 3fa93ee09a..5a27ac25b2 100644 --- a/Orange/data/tests/test_pandas.py +++ b/Orange/data/tests/test_pandas_compat.py @@ -72,6 +72,13 @@ def test_table_from_frame(self): self.assertEqual(names, ['index', '1', '2']) self.assertEqual(types, [DiscreteVariable, ContinuousVariable, TimeVariable]) + dvar = DiscreteVariable('x', values=tuple("dacb")) + cvar = ContinuousVariable('y') + table = table_from_frame(df, variables=[dvar, cvar, None]) + self.assertIs(table.domain[0], dvar) + self.assertIs(table.domain[1], cvar) + self.assertIsInstance(table.domain[3], TimeVariable) + def test_table_from_frame_keep_ids(self): """ Test if indices are correctly transferred to Table""" df = OrangeDataFrame(Table('iris')[:6])