Repository: modin-project/modin

Issue:
Use custom pytest mark instead of `--extra-test-parameters` option



Discussion:

Resolving patch:
diff --git a/modin/conftest.py b/modin/conftest.py
--- a/modin/conftest.py
+++ b/modin/conftest.py
@@ -90,12 +90,6 @@ def pytest_addoption(parser):
         default=None,
         help="specifies execution to run tests on",
     )
-    parser.addoption(
-        "--extra-test-parameters",
-        action="store_true",
-        help="activate extra test parameter combinations",
-        default=False,
-    )
 
 
 def set_experimental_env(mode):
@@ -256,10 +250,6 @@ def get_unique_base_execution():
 
 
 def pytest_configure(config):
-    import modin.pandas.test.utils as utils
-
-    utils.extra_test_parameters = config.getoption("--extra-test-parameters")
-
     execution = config.option.execution
 
     if execution is None:


Test patch:
diff --git a/modin/pandas/test/dataframe/test_indexing.py b/modin/pandas/test/dataframe/test_indexing.py
--- a/modin/pandas/test/dataframe/test_indexing.py
+++ b/modin/pandas/test/dataframe/test_indexing.py
@@ -34,7 +34,6 @@
     default_to_pandas_ignore_string,
     df_equals,
     eval_general,
-    extra_test_parameters,
     generate_multiindex,
     int_arg_keys,
     int_arg_values,
@@ -1448,7 +1447,7 @@ def test_reset_index_multiindex_groupby(data):
     [
         pytest.param(
             test_data["int_data"],
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
         test_data["float_nan_data"],
     ],
@@ -1469,23 +1468,23 @@ def test_reset_index_multiindex_groupby(data):
         [1, 0],
         pytest.param(
             [2, 1, 2],
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
         pytest.param(
             [0, 0, 0, 0],
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
         pytest.param(
             ["level_name_1"],
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
         pytest.param(
             ["level_name_2", "level_name_1"],
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
         pytest.param(
             [2, "level_name_0"],
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
     ],
 )
@@ -1498,12 +1497,8 @@ def test_reset_index_multiindex_groupby(data):
         0,
         1,
         2,
-        pytest.param(
-            3, marks=pytest.mark.skipif(not extra_test_parameters, reason="extra")
-        ),
-        pytest.param(
-            4, marks=pytest.mark.skipif(not extra_test_parameters, reason="extra")
-        ),
+        pytest.param(3, marks=pytest.mark.exclude_by_default),
+        pytest.param(4, marks=pytest.mark.exclude_by_default),
     ],
 )
 @pytest.mark.parametrize(
@@ -1511,13 +1506,13 @@ def test_reset_index_multiindex_groupby(data):
     [
         pytest.param(
             False,
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
         True,
         "mixed_1st_None",
         pytest.param(
             "mixed_2nd_None",
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
     ],
 )
@@ -1606,7 +1601,7 @@ def test_reset_index_with_multi_index_no_drop(
     [
         pytest.param(
             test_data["int_data"],
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
         test_data["float_nan_data"],
     ],
@@ -1626,23 +1621,23 @@ def test_reset_index_with_multi_index_no_drop(
         [1, 0],
         pytest.param(
             [2, 1, 2],
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
         pytest.param(
             [0, 0, 0, 0],
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
         pytest.param(
             ["level_name_1"],
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
         pytest.param(
             ["level_name_2", "level_name_1"],
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
         pytest.param(
             [2, "level_name_0"],
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
     ],
 )
@@ -1652,12 +1647,8 @@ def test_reset_index_with_multi_index_no_drop(
         0,
         1,
         2,
-        pytest.param(
-            3, marks=pytest.mark.skipif(not extra_test_parameters, reason="extra")
-        ),
-        pytest.param(
-            4, marks=pytest.mark.skipif(not extra_test_parameters, reason="extra")
-        ),
+        pytest.param(3, marks=pytest.mark.exclude_by_default),
+        pytest.param(4, marks=pytest.mark.exclude_by_default),
     ],
 )
 @pytest.mark.parametrize(
@@ -1665,13 +1656,13 @@ def test_reset_index_with_multi_index_no_drop(
     [
         pytest.param(
             False,
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
         True,
         "mixed_1st_None",
         pytest.param(
             "mixed_2nd_None",
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
     ],
 )
diff --git a/modin/pandas/test/dataframe/test_join_sort.py b/modin/pandas/test/dataframe/test_join_sort.py
--- a/modin/pandas/test/dataframe/test_join_sort.py
+++ b/modin/pandas/test/dataframe/test_join_sort.py
@@ -30,7 +30,6 @@
     default_to_pandas_ignore_string,
     df_equals,
     eval_general,
-    extra_test_parameters,
     generate_multiindex,
     random_state,
     rotate_decimal_digits_or_symbols,
@@ -542,11 +541,11 @@ def test_sort_multiindex(sort_remaining):
     [
         pytest.param(
             "first",
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
         pytest.param(
             "first,last",
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
         "first,last,middle",
     ],
@@ -565,12 +564,12 @@ def test_sort_multiindex(sort_remaining):
     [
         pytest.param(
             "mergesort",
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
         "quicksort",
         pytest.param(
             "heapsort",
-            marks=pytest.mark.skipif(not extra_test_parameters, reason="extra"),
+            marks=pytest.mark.exclude_by_default,
         ),
     ],
 )
diff --git a/modin/pandas/test/utils.py b/modin/pandas/test/utils.py
--- a/modin/pandas/test/utils.py
+++ b/modin/pandas/test/utils.py
@@ -46,10 +46,6 @@
 from modin.config import MinPartitionSize, NPartitions, TestDatasetSize, TrackFileLeaks
 from modin.utils import to_pandas, try_cast_to_pandas
 
-# Flag activated on command line with "--extra-test-parameters" option.
-# Used in some tests to perform additional parameter combinations.
-extra_test_parameters = False
-
 random_state = np.random.RandomState(seed=42)
 
 DATASET_SIZE_DICT = {