From aa3f3d91b7efc697dd61d81d68992aada68ec2f2 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Mon, 19 Dec 2022 14:34:28 -0800 Subject: [PATCH 1/3] Remove all passed exception messages and change signature. --- python/cudf/cudf/testing/_utils.py | 21 +-------------------- python/cudf/cudf/tests/test_categorical.py | 1 - python/cudf/cudf/tests/test_column.py | 1 - python/cudf/cudf/tests/test_concat.py | 11 ----------- python/cudf/cudf/tests/test_csv.py | 2 -- python/cudf/cudf/tests/test_dataframe.py | 10 ---------- python/cudf/cudf/tests/test_datetime.py | 9 --------- python/cudf/cudf/tests/test_duplicates.py | 2 -- python/cudf/cudf/tests/test_groupby.py | 1 - python/cudf/cudf/tests/test_index.py | 5 ----- python/cudf/cudf/tests/test_indexing.py | 4 ---- python/cudf/cudf/tests/test_quantiles.py | 3 --- python/cudf/cudf/tests/test_reductions.py | 11 ----------- python/cudf/cudf/tests/test_replace.py | 3 --- python/cudf/cudf/tests/test_series.py | 6 ------ python/cudf/cudf/tests/test_seriesmap.py | 2 -- python/cudf/cudf/tests/test_setitem.py | 2 -- python/cudf/cudf/tests/test_sorting.py | 2 -- python/cudf/cudf/tests/test_string.py | 9 --------- python/cudf/cudf/tests/test_timedelta.py | 8 -------- 20 files changed, 1 insertion(+), 112 deletions(-) diff --git a/python/cudf/cudf/testing/_utils.py b/python/cudf/cudf/testing/_utils.py index a6f55df4bcf..302c37cb0f7 100644 --- a/python/cudf/cudf/testing/_utils.py +++ b/python/cudf/cudf/testing/_utils.py @@ -1,7 +1,6 @@ # Copyright (c) 2020-2022, NVIDIA CORPORATION. import itertools -import re import warnings from collections import abc from contextlib import contextmanager @@ -161,8 +160,6 @@ def assert_exceptions_equal( lfunc_args_and_kwargs=None, rfunc_args_and_kwargs=None, check_exception_type=True, - compare_error_message=True, - expected_error_message=None, ): """Compares if two functions ``lfunc`` and ``rfunc`` raise same exception or not. @@ -190,14 +187,6 @@ def assert_exceptions_equal( Whether to compare the exception types raised by ``lfunc`` with ``rfunc`` exception type or not. If False, ``rfunc`` is simply evaluated against `Exception` type. - compare_error_message : boolean, default True - Whether to compare the error messages raised - when calling both ``lfunc`` and - ``rfunc`` or not. - expected_error_message : str, default None - Expected error message to be raised by calling ``rfunc``. - Note that ``lfunc`` error message will not be compared to - this value. Returns ------- @@ -223,15 +212,7 @@ def assert_exceptions_equal( except KeyboardInterrupt: raise except Exception as e: - if not compare_error_message: - expected_error_message = None - elif expected_error_message is None: - expected_error_message = re.escape(str(e)) - - with pytest.raises( - type(e) if check_exception_type else Exception, - match=expected_error_message, - ): + with pytest.raises(type(e) if check_exception_type else Exception): rfunc(*rfunc_args, **rfunc_kwargs) else: raise AssertionError("Expected to fail with an Exception.") diff --git a/python/cudf/cudf/tests/test_categorical.py b/python/cudf/cudf/tests/test_categorical.py index 45b1891883e..a3ce9ce3467 100644 --- a/python/cudf/cudf/tests/test_categorical.py +++ b/python/cudf/cudf/tests/test_categorical.py @@ -539,7 +539,6 @@ def test_categorical_remove_categories(pd_str_cat, inplace): rfunc=cd_sr.cat.remove_categories, lfunc_args_and_kwargs=([["a", "d"]], {"inplace": inplace}), rfunc_args_and_kwargs=([["a", "d"]], {"inplace": inplace}), - expected_error_message="removals must all be in old categories", ) diff --git a/python/cudf/cudf/tests/test_column.py b/python/cudf/cudf/tests/test_column.py index 467c88b200f..9896dfd7ad2 100644 --- a/python/cudf/cudf/tests/test_column.py +++ b/python/cudf/cudf/tests/test_column.py @@ -308,7 +308,6 @@ def test_column_view_invalid_numeric_to_numeric(data, from_dtype, to_dtype): rfunc=gpu_data.view, lfunc_args_and_kwargs=([to_dtype],), rfunc_args_and_kwargs=([to_dtype],), - expected_error_message="Can not divide", ) diff --git a/python/cudf/cudf/tests/test_concat.py b/python/cudf/cudf/tests/test_concat.py index 20e1c3624da..3b39f307d5f 100644 --- a/python/cudf/cudf/tests/test_concat.py +++ b/python/cudf/cudf/tests/test_concat.py @@ -1,6 +1,5 @@ # Copyright (c) 2018-2022, NVIDIA CORPORATION. -import re from decimal import Decimal import numpy as np @@ -138,10 +137,6 @@ def test_concat_errors(): rfunc=gd.concat, lfunc_args_and_kwargs=([], {"objs": [df, df.index, df.x]}), rfunc_args_and_kwargs=([], {"objs": [gdf, gdf.index, gdf.x]}), - expected_error_message=re.escape( - "`concat` cannot concatenate objects of " - "types: ['DataFrame', 'RangeIndex', 'Series']." - ), ) # Unknown type @@ -150,9 +145,6 @@ def test_concat_errors(): rfunc=gd.concat, lfunc_args_and_kwargs=([], {"objs": ["bar", "foo"]}), rfunc_args_and_kwargs=([], {"objs": ["bar", "foo"]}), - expected_error_message=re.escape( - "cannot concatenate object of type " - ), ) # Mismatched index dtypes @@ -172,9 +164,6 @@ def test_concat_errors(): {"objs": [gdf.to_pandas(), gdf2.to_pandas()], "axis": "bad_value"}, ), rfunc_args_and_kwargs=([], {"objs": [gdf, gdf2], "axis": "bad_value"}), - expected_error_message=re.escape( - '`axis` must be 0 / "index"' ' or 1 / "columns", got: None' - ), ) diff --git a/python/cudf/cudf/tests/test_csv.py b/python/cudf/cudf/tests/test_csv.py index 46cf059efe9..cdb8939a508 100644 --- a/python/cudf/cudf/tests/test_csv.py +++ b/python/cudf/cudf/tests/test_csv.py @@ -2101,7 +2101,6 @@ def test_csv_sep_error(): rfunc=gdf.to_csv, lfunc_args_and_kwargs=([], {"sep": "abc"}), rfunc_args_and_kwargs=([], {"sep": "abc"}), - expected_error_message='"sep" must be a 1-character string', ) assert_exceptions_equal( @@ -2109,7 +2108,6 @@ def test_csv_sep_error(): rfunc=gdf.to_csv, lfunc_args_and_kwargs=([], {"sep": 1}), rfunc_args_and_kwargs=([], {"sep": 1}), - expected_error_message='"sep" must be string, not int', ) diff --git a/python/cudf/cudf/tests/test_dataframe.py b/python/cudf/cudf/tests/test_dataframe.py index 823abbafd7d..aac3767a9cd 100644 --- a/python/cudf/cudf/tests/test_dataframe.py +++ b/python/cudf/cudf/tests/test_dataframe.py @@ -617,7 +617,6 @@ def test_dataframe_drop_error(): rfunc=df.drop, lfunc_args_and_kwargs=([], {"columns": "d"}), rfunc_args_and_kwargs=([], {"columns": "d"}), - expected_error_message="column 'd' does not exist", ) assert_exceptions_equal( @@ -625,7 +624,6 @@ def test_dataframe_drop_error(): rfunc=df.drop, lfunc_args_and_kwargs=([], {"columns": ["a", "d", "b"]}), rfunc_args_and_kwargs=([], {"columns": ["a", "d", "b"]}), - expected_error_message="column 'd' does not exist", ) assert_exceptions_equal( @@ -633,7 +631,6 @@ def test_dataframe_drop_error(): rfunc=df.drop, lfunc_args_and_kwargs=(["a"], {"columns": "a", "axis": 1}), rfunc_args_and_kwargs=(["a"], {"columns": "a", "axis": 1}), - expected_error_message="Cannot specify both", ) assert_exceptions_equal( @@ -641,7 +638,6 @@ def test_dataframe_drop_error(): rfunc=df.drop, lfunc_args_and_kwargs=([], {"axis": 1}), rfunc_args_and_kwargs=([], {"axis": 1}), - expected_error_message="Need to specify at least", ) assert_exceptions_equal( @@ -649,7 +645,6 @@ def test_dataframe_drop_error(): rfunc=df.drop, lfunc_args_and_kwargs=([[2, 0]],), rfunc_args_and_kwargs=([[2, 0]],), - expected_error_message="One or more values not found in axis", ) @@ -725,7 +720,6 @@ def test_dataframe_drop_raises(): rfunc=df.drop, lfunc_args_and_kwargs=(["p"],), rfunc_args_and_kwargs=(["p"],), - expected_error_message="One or more values not found in axis", ) # label dtype mismatch @@ -734,7 +728,6 @@ def test_dataframe_drop_raises(): rfunc=df.drop, lfunc_args_and_kwargs=([3],), rfunc_args_and_kwargs=([3],), - expected_error_message="One or more values not found in axis", ) expect = pdf.drop("p", errors="ignore") @@ -747,7 +740,6 @@ def test_dataframe_drop_raises(): rfunc=df.drop, lfunc_args_and_kwargs=([], {"columns": "p"}), rfunc_args_and_kwargs=([], {"columns": "p"}), - expected_error_message="column 'p' does not exist", ) expect = pdf.drop(columns="p", errors="ignore") @@ -760,7 +752,6 @@ def test_dataframe_drop_raises(): rfunc=df.drop, lfunc_args_and_kwargs=([], {"labels": "p", "axis": 1}), rfunc_args_and_kwargs=([], {"labels": "p", "axis": 1}), - expected_error_message="column 'p' does not exist", ) expect = pdf.drop(labels="p", axis=1, errors="ignore") @@ -2940,7 +2931,6 @@ def test_reset_index_dup_level_name(level, drop, inplace, col_level, col_fill): [], {"level": level, "drop": drop, "inplace": inplace}, ), - expected_error_message="occurs multiple times, use a level number", ) return diff --git a/python/cudf/cudf/tests/test_datetime.py b/python/cudf/cudf/tests/test_datetime.py index 109f27f4cb5..0c9bb788241 100644 --- a/python/cudf/cudf/tests/test_datetime.py +++ b/python/cudf/cudf/tests/test_datetime.py @@ -2,7 +2,6 @@ import datetime import operator -import re import cupy as cp import numpy as np @@ -669,7 +668,6 @@ def test_to_datetime_errors(data): ([pd_data],), ([gd_data],), compare_error_message=False, - expected_error_message="Given date string not likely a datetime.", ) @@ -867,9 +865,6 @@ def test_str_to_datetime_error(): lfunc_args_and_kwargs=(["datetime64[s]"],), rfunc_args_and_kwargs=(["datetime64[s]"],), check_exception_type=False, - expected_error_message=re.escape( - "Could not convert `None` value to datetime" - ), ) @@ -1287,10 +1282,6 @@ def test_datetime_to_datetime_error(): lfunc_args_and_kwargs=(["02-Oct-2017 09:30", "%d-%B-%Y %H:%M"],), rfunc_args_and_kwargs=(["02-Oct-2017 09:30", "%d-%B-%Y %H:%M"],), check_exception_type=False, - expected_error_message=re.escape( - "errors parameter has to be either one of: ['ignore', 'raise', " - "'coerce', 'warn'], found: %d-%B-%Y %H:%M" - ), ) diff --git a/python/cudf/cudf/tests/test_duplicates.py b/python/cudf/cudf/tests/test_duplicates.py index 98061f4e977..453dae73a0d 100644 --- a/python/cudf/cudf/tests/test_duplicates.py +++ b/python/cudf/cudf/tests/test_duplicates.py @@ -372,7 +372,6 @@ def test_dataframe_drop_duplicates_method(): rfunc=gdf.drop_duplicates, lfunc_args_and_kwargs=(["n3"],), rfunc_args_and_kwargs=(["n3"],), - expected_error_message="columns {'n3'} do not exist", ) assert_exceptions_equal( @@ -380,7 +379,6 @@ def test_dataframe_drop_duplicates_method(): rfunc=gdf.drop_duplicates, lfunc_args_and_kwargs=([["n1", "n4", "n3"]],), rfunc_args_and_kwargs=([["n1", "n4", "n3"]],), - expected_error_message="columns {'n[34]', 'n[34]'} do not exist", ) diff --git a/python/cudf/cudf/tests/test_groupby.py b/python/cudf/cudf/tests/test_groupby.py index 78b1327e7e1..1addfc34059 100644 --- a/python/cudf/cudf/tests/test_groupby.py +++ b/python/cudf/cudf/tests/test_groupby.py @@ -696,7 +696,6 @@ def test_advanced_groupby_levels(): rfunc=gdg.groupby, lfunc_args_and_kwargs=([], {"level": 2}), rfunc_args_and_kwargs=([], {"level": 2}), - expected_error_message="Invalid level number", ) diff --git a/python/cudf/cudf/tests/test_index.py b/python/cudf/cudf/tests/test_index.py index 1c1ed9bba98..6cb2a699ee9 100644 --- a/python/cudf/cudf/tests/test_index.py +++ b/python/cudf/cudf/tests/test_index.py @@ -1116,7 +1116,6 @@ def test_index_append_error(data, other): rfunc=gd_data.append, lfunc_args_and_kwargs=([[sr.to_pandas()]],), rfunc_args_and_kwargs=([[sr]],), - expected_error_message=r"all inputs must be Index", ) @@ -2571,10 +2570,6 @@ def test_isin_multiindex(data, values, level, err): lfunc_args_and_kwargs=([values], {"level": level}), rfunc_args_and_kwargs=([values], {"level": level}), check_exception_type=False, - expected_error_message=re.escape( - "values need to be a Multi-Index or set/list-like tuple " - "squences when `level=None`." - ), ) diff --git a/python/cudf/cudf/tests/test_indexing.py b/python/cudf/cudf/tests/test_indexing.py index f7c7346c91c..8cf93ac9d1d 100644 --- a/python/cudf/cudf/tests/test_indexing.py +++ b/python/cudf/cudf/tests/test_indexing.py @@ -1679,10 +1679,6 @@ def test_dataframe_indexing_setitem_np_cp_array(array, is_error): [(slice(None, None, None), ["a", "b"]), array], {}, ), - compare_error_message=False, - expected_error_message="shape mismatch: value array of shape " - "(10, 3) could not be broadcast to indexing " - "result of shape (10, 2)", ) diff --git a/python/cudf/cudf/tests/test_quantiles.py b/python/cudf/cudf/tests/test_quantiles.py index 72b36d8a1a6..eddbc80bf19 100644 --- a/python/cudf/cudf/tests/test_quantiles.py +++ b/python/cudf/cudf/tests/test_quantiles.py @@ -62,9 +62,6 @@ def test_quantile_range_error(q): rfunc=gs.quantile, lfunc_args_and_kwargs=([q],), rfunc_args_and_kwargs=([q],), - expected_error_message=re.escape( - "percentiles should all be in the interval [0, 1]" - ), ) diff --git a/python/cudf/cudf/tests/test_reductions.py b/python/cudf/cudf/tests/test_reductions.py index a24fef93f89..b769c3e79df 100644 --- a/python/cudf/cudf/tests/test_reductions.py +++ b/python/cudf/cudf/tests/test_reductions.py @@ -1,7 +1,6 @@ # Copyright (c) 2020-2022, NVIDIA CORPORATION. -import re from decimal import Decimal from itertools import product @@ -287,11 +286,6 @@ def test_datetime_unsupported_reductions(op): utils.assert_exceptions_equal( lfunc=getattr(psr, op), rfunc=getattr(gsr, op), - expected_error_message=re.escape( - "cannot perform " - + ("kurtosis" if op == "kurt" else op) - + " with type datetime64[ns]" - ), ) @@ -303,11 +297,6 @@ def test_timedelta_unsupported_reductions(op): utils.assert_exceptions_equal( lfunc=getattr(psr, op), rfunc=getattr(gsr, op), - expected_error_message=re.escape( - "cannot perform " - + ("kurtosis" if op == "kurt" else op) - + " with type timedelta64[ns]" - ), ) diff --git a/python/cudf/cudf/tests/test_replace.py b/python/cudf/cudf/tests/test_replace.py index 1133e9fe50c..feb04669876 100644 --- a/python/cudf/cudf/tests/test_replace.py +++ b/python/cudf/cudf/tests/test_replace.py @@ -1247,9 +1247,6 @@ def test_series_replace_errors(): rfunc=gsr.replace, lfunc_args_and_kwargs=([[1, 2], [1]],), rfunc_args_and_kwargs=([[1, 2], [1]],), - expected_error_message=re.escape( - "Replacement lists must be of same length. " "Expected 2, got 1." - ), ) assert_exceptions_equal( diff --git a/python/cudf/cudf/tests/test_series.py b/python/cudf/cudf/tests/test_series.py index 0f6e9f48e10..2f9fea81d68 100644 --- a/python/cudf/cudf/tests/test_series.py +++ b/python/cudf/cudf/tests/test_series.py @@ -1144,7 +1144,6 @@ def test_series_drop_edge_inputs(): rfunc=gs.drop, lfunc_args_and_kwargs=(["a"], {"columns": "a", "axis": 1}), rfunc_args_and_kwargs=(["a"], {"columns": "a", "axis": 1}), - compare_error_message=False, ) assert_exceptions_equal( @@ -1152,7 +1151,6 @@ def test_series_drop_edge_inputs(): rfunc=gs.drop, lfunc_args_and_kwargs=([], {}), rfunc_args_and_kwargs=([], {}), - expected_error_message="Need to specify at least one", ) assert_exceptions_equal( @@ -1160,7 +1158,6 @@ def test_series_drop_edge_inputs(): rfunc=gs.drop, lfunc_args_and_kwargs=(["b"], {"axis": 1}), rfunc_args_and_kwargs=(["b"], {"axis": 1}), - expected_error_message="No axis named 1", ) @@ -1173,7 +1170,6 @@ def test_series_drop_raises(): rfunc=gs.drop, lfunc_args_and_kwargs=(["p"],), rfunc_args_and_kwargs=(["p"],), - expected_error_message="One or more values not found in axis", ) # dtype specified mismatch @@ -1182,7 +1178,6 @@ def test_series_drop_raises(): rfunc=gs.drop, lfunc_args_and_kwargs=([3],), rfunc_args_and_kwargs=([3],), - expected_error_message="One or more values not found in axis", ) expect = ps.drop("p", errors="ignore") @@ -1475,7 +1470,6 @@ def test_reset_index_dup_level_name_exceptions(): [], {"level": [None]}, ), - expected_error_message="occurs multiple times, use a level number", ) # Cannot use drop=False and inplace=True to turn a series into dataframe. diff --git a/python/cudf/cudf/tests/test_seriesmap.py b/python/cudf/cudf/tests/test_seriesmap.py index 4ed6bf7afdd..339a7a05b86 100644 --- a/python/cudf/cudf/tests/test_seriesmap.py +++ b/python/cudf/cudf/tests/test_seriesmap.py @@ -92,6 +92,4 @@ def test_series_map_non_unique_index(): check_exception_type=False, lfunc_args_and_kwargs=([pd_map_series],), rfunc_args_and_kwargs=([gd_map_series],), - expected_error_message="Reindexing only valid with uniquely" - " valued Index objects", ) diff --git a/python/cudf/cudf/tests/test_setitem.py b/python/cudf/cudf/tests/test_setitem.py index 0298a62b9d2..4b1501bc5ca 100644 --- a/python/cudf/cudf/tests/test_setitem.py +++ b/python/cudf/cudf/tests/test_setitem.py @@ -240,8 +240,6 @@ def test_categorical_setitem_invalid(): lfunc_args_and_kwargs=([0, 5], {}), rfunc_args_and_kwargs=([0, 5], {}), compare_error_message=False, - expected_error_message="Cannot setitem on a Categorical with a " - "new category, set the categories first", ) else: # Following workaround is needed because: diff --git a/python/cudf/cudf/tests/test_sorting.py b/python/cudf/cudf/tests/test_sorting.py index a182a5e7d24..e52b3b67f8d 100644 --- a/python/cudf/cudf/tests/test_sorting.py +++ b/python/cudf/cudf/tests/test_sorting.py @@ -128,7 +128,6 @@ def test_series_nlargest(data, n): rfunc=sr.nlargest, lfunc_args_and_kwargs=([], {"n": 3, "keep": "what"}), rfunc_args_and_kwargs=([], {"n": 3, "keep": "what"}), - expected_error_message='keep must be either "first", "last"', ) @@ -149,7 +148,6 @@ def test_series_nsmallest(data, n): rfunc=sr.nsmallest, lfunc_args_and_kwargs=([], {"n": 3, "keep": "what"}), rfunc_args_and_kwargs=([], {"n": 3, "keep": "what"}), - expected_error_message='keep must be either "first", "last"', ) diff --git a/python/cudf/cudf/tests/test_string.py b/python/cudf/cudf/tests/test_string.py index 2a43adf5a5c..401b93525eb 100644 --- a/python/cudf/cudf/tests/test_string.py +++ b/python/cudf/cudf/tests/test_string.py @@ -2019,18 +2019,12 @@ def test_string_starts_ends(data, pat): rfunc=gs.str.startswith, lfunc_args_and_kwargs=([pat],), rfunc_args_and_kwargs=([pat],), - compare_error_message=False, - expected_error_message="expected a string or a sequence-like " - "object, not NoneType", ) assert_exceptions_equal( lfunc=ps.str.endswith, rfunc=gs.str.endswith, lfunc_args_and_kwargs=([pat],), rfunc_args_and_kwargs=([pat],), - compare_error_message=False, - expected_error_message="expected a string or a sequence-like " - "object, not NoneType", ) else: assert_eq( @@ -2986,9 +2980,6 @@ def test_string_product(): assert_exceptions_equal( lfunc=psr.product, rfunc=sr.product, - expected_error_message=re.escape( - f"cannot perform product with type {sr.dtype}" - ), ) diff --git a/python/cudf/cudf/tests/test_timedelta.py b/python/cudf/cudf/tests/test_timedelta.py index b3dfafa3cd0..3e4dc50af20 100644 --- a/python/cudf/cudf/tests/test_timedelta.py +++ b/python/cudf/cudf/tests/test_timedelta.py @@ -2,7 +2,6 @@ import datetime import operator -import re import cupy as cp import numpy as np @@ -1374,9 +1373,6 @@ def test_timedelta_datetime_cast_invalid(): sr.astype, (["datetime64[ns]"],), (["datetime64[ns]"],), - expected_error_message=re.escape( - "cannot astype a timedelta from timedelta64[ns] to datetime64[ns]" - ), ) sr = cudf.Series([1, 2, 3], dtype="datetime64[ns]") @@ -1387,10 +1383,6 @@ def test_timedelta_datetime_cast_invalid(): sr.astype, (["timedelta64[ns]"],), (["timedelta64[ns]"],), - expected_error_message=re.escape( - "cannot astype a datetimelike from " - "datetime64[ns] to timedelta64[ns]" - ), ) From f67aec166526501519d73be846e1e3fc14fcf984 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Mon, 19 Dec 2022 14:43:24 -0800 Subject: [PATCH 2/3] Remove compare_error_message. --- python/cudf/cudf/tests/test_categorical.py | 5 ----- python/cudf/cudf/tests/test_dataframe.py | 7 ------- python/cudf/cudf/tests/test_datetime.py | 10 ---------- python/cudf/cudf/tests/test_duplicates.py | 1 - python/cudf/cudf/tests/test_groupby.py | 2 -- python/cudf/cudf/tests/test_index.py | 9 --------- python/cudf/cudf/tests/test_indexing.py | 6 ------ python/cudf/cudf/tests/test_multiindex.py | 8 +------- python/cudf/cudf/tests/test_reductions.py | 4 +--- python/cudf/cudf/tests/test_replace.py | 1 - python/cudf/cudf/tests/test_setitem.py | 3 --- python/cudf/cudf/tests/test_stats.py | 2 -- python/cudf/cudf/tests/test_string.py | 9 ++------- python/cudf/cudf/tests/test_timedelta.py | 14 -------------- 14 files changed, 4 insertions(+), 77 deletions(-) diff --git a/python/cudf/cudf/tests/test_categorical.py b/python/cudf/cudf/tests/test_categorical.py index a3ce9ce3467..2e66926b346 100644 --- a/python/cudf/cudf/tests/test_categorical.py +++ b/python/cudf/cudf/tests/test_categorical.py @@ -136,7 +136,6 @@ def test_categorical_compare_unordered(): rfunc=operator.lt, lfunc_args_and_kwargs=([pdsr, pdsr],), rfunc_args_and_kwargs=([sr, sr],), - compare_error_message=False, ) @@ -182,7 +181,6 @@ def test_categorical_binary_add(): rfunc=operator.add, lfunc_args_and_kwargs=([pdsr, pdsr],), rfunc_args_and_kwargs=([sr, sr],), - compare_error_message=False, ) @@ -260,7 +258,6 @@ def test_cat_series_binop_error(): rfunc=operator.add, lfunc_args_and_kwargs=([pdf["a"], pdf["b"]],), rfunc_args_and_kwargs=([df["a"], df["b"]],), - compare_error_message=False, ) # lhs is numerical @@ -269,7 +266,6 @@ def test_cat_series_binop_error(): rfunc=operator.add, lfunc_args_and_kwargs=([pdf["b"], pdf["a"]],), rfunc_args_and_kwargs=([df["b"], df["a"]],), - compare_error_message=False, ) @@ -782,7 +778,6 @@ def test_add_categories_error(data, add): gds.cat.add_categories, ([add],), ([add],), - compare_error_message=False, ) diff --git a/python/cudf/cudf/tests/test_dataframe.py b/python/cudf/cudf/tests/test_dataframe.py index aac3767a9cd..4c42cc8092e 100644 --- a/python/cudf/cudf/tests/test_dataframe.py +++ b/python/cudf/cudf/tests/test_dataframe.py @@ -2283,7 +2283,6 @@ def test_arithmetic_binops_df(pdf, gdf, binop, other): rfunc=binop, lfunc_args_and_kwargs=([pdf, other], {}), rfunc_args_and_kwargs=([gdf, cudf_other], {}), - compare_error_message=False, ) else: if isinstance(other, (pd.Series, pd.DataFrame)): @@ -2330,7 +2329,6 @@ def test_comparison_binops_df(pdf, gdf, binop, other): rfunc=binop, lfunc_args_and_kwargs=([pdf, other], {}), rfunc_args_and_kwargs=([gdf, cudf_other], {}), - compare_error_message=False, ) else: if isinstance(other, (pd.Series, pd.DataFrame)): @@ -2389,7 +2387,6 @@ def test_comparison_binops_df_reindexing(pdf, gdf, binop, other): rfunc=binop, lfunc_args_and_kwargs=([pdf, other], {}), rfunc_args_and_kwargs=([gdf, cudf_other], {}), - compare_error_message=False, ) else: if isinstance(other, (pd.Series, pd.DataFrame)): @@ -5955,9 +5952,6 @@ def test_df_sr_mask_where(data, condition, other, error, inplace): [gs_condition], {"other": gs_other, "inplace": inplace}, ), - compare_error_message=False - if error is NotImplementedError - else True, ) assert_exceptions_equal( @@ -5971,7 +5965,6 @@ def test_df_sr_mask_where(data, condition, other, error, inplace): [gs_condition], {"other": gs_other, "inplace": inplace}, ), - compare_error_message=False, ) diff --git a/python/cudf/cudf/tests/test_datetime.py b/python/cudf/cudf/tests/test_datetime.py index 0c9bb788241..dd174abf770 100644 --- a/python/cudf/cudf/tests/test_datetime.py +++ b/python/cudf/cudf/tests/test_datetime.py @@ -667,7 +667,6 @@ def test_to_datetime_errors(data): cudf.to_datetime, ([pd_data],), ([gd_data],), - compare_error_message=False, ) @@ -984,7 +983,6 @@ def test_datetime_series_ops_with_scalars(data, other_scalars, dtype, op): rfunc=operator.sub, lfunc_args_and_kwargs=([other_scalars, psr],), rfunc_args_and_kwargs=([other_scalars, gsr],), - compare_error_message=False, ) @@ -1042,7 +1040,6 @@ def test_datetime_invalid_ops(): rfunc=operator.add, lfunc_args_and_kwargs=([psr, pd.Timestamp(1513393355.5, unit="s")],), rfunc_args_and_kwargs=([sr, pd.Timestamp(1513393355.5, unit="s")],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1050,7 +1047,6 @@ def test_datetime_invalid_ops(): rfunc=operator.truediv, lfunc_args_and_kwargs=([psr, pd.Timestamp(1513393355.5, unit="s")],), rfunc_args_and_kwargs=([sr, pd.Timestamp(1513393355.5, unit="s")],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1058,7 +1054,6 @@ def test_datetime_invalid_ops(): rfunc=operator.add, lfunc_args_and_kwargs=([psr, psr],), rfunc_args_and_kwargs=([sr, sr],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1066,7 +1061,6 @@ def test_datetime_invalid_ops(): rfunc=operator.floordiv, lfunc_args_and_kwargs=([psr, psr],), rfunc_args_and_kwargs=([sr, sr],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1074,7 +1068,6 @@ def test_datetime_invalid_ops(): rfunc=operator.floordiv, lfunc_args_and_kwargs=([psr, pd.Timestamp(1513393355.5, unit="s")],), rfunc_args_and_kwargs=([sr, pd.Timestamp(1513393355.5, unit="s")],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1082,7 +1075,6 @@ def test_datetime_invalid_ops(): rfunc=operator.add, lfunc_args_and_kwargs=([psr, 1],), rfunc_args_and_kwargs=([sr, 1],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1090,7 +1082,6 @@ def test_datetime_invalid_ops(): rfunc=operator.truediv, lfunc_args_and_kwargs=([psr, "a"],), rfunc_args_and_kwargs=([sr, "a"],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1098,7 +1089,6 @@ def test_datetime_invalid_ops(): rfunc=operator.mul, lfunc_args_and_kwargs=([psr, 1],), rfunc_args_and_kwargs=([sr, 1],), - compare_error_message=False, ) diff --git a/python/cudf/cudf/tests/test_duplicates.py b/python/cudf/cudf/tests/test_duplicates.py index 453dae73a0d..b00b9dbe2b2 100644 --- a/python/cudf/cudf/tests/test_duplicates.py +++ b/python/cudf/cudf/tests/test_duplicates.py @@ -48,7 +48,6 @@ def test_duplicated_with_misspelled_column_name(subset): rfunc=gdf.drop_duplicates, lfunc_args_and_kwargs=([subset],), rfunc_args_and_kwargs=([subset],), - compare_error_message=False, ) diff --git a/python/cudf/cudf/tests/test_groupby.py b/python/cudf/cudf/tests/test_groupby.py index 1addfc34059..97ce06af949 100644 --- a/python/cudf/cudf/tests/test_groupby.py +++ b/python/cudf/cudf/tests/test_groupby.py @@ -1396,7 +1396,6 @@ def test_raise_data_error(): assert_exceptions_equal( pdf.groupby("a").mean, gdf.groupby("a").mean, - compare_error_message=False, ) @@ -1812,7 +1811,6 @@ def test_groupby_nonempty_no_keys(pdf): assert_exceptions_equal( lambda: pdf.groupby([]), lambda: gdf.groupby([]), - compare_error_message=False, ) diff --git a/python/cudf/cudf/tests/test_index.py b/python/cudf/cudf/tests/test_index.py index 6cb2a699ee9..fb645621326 100644 --- a/python/cudf/cudf/tests/test_index.py +++ b/python/cudf/cudf/tests/test_index.py @@ -676,7 +676,6 @@ def test_index_where(data, condition, other, error): rfunc=gs.where, lfunc_args_and_kwargs=([ps_condition], {"other": ps_other}), rfunc_args_and_kwargs=([gs_condition], {"other": gs_other}), - compare_error_message=False, ) @@ -1992,7 +1991,6 @@ def test_get_loc_single_unique_numeric(idx, key, method): rfunc=gi.get_loc, lfunc_args_and_kwargs=([], {"key": key, "method": method}), rfunc_args_and_kwargs=([], {"key": key, "method": method}), - compare_error_message=False, ) else: with expect_warning_if(method is not None): @@ -2025,7 +2023,6 @@ def test_get_loc_rangeindex(idx, key, method): rfunc=gi.get_loc, lfunc_args_and_kwargs=([], {"key": key, "method": method}), rfunc_args_and_kwargs=([], {"key": key, "method": method}), - compare_error_message=False, ) else: with expect_warning_if(method is not None): @@ -2055,7 +2052,6 @@ def test_get_loc_single_duplicate_numeric(idx, key, method): rfunc=gi.get_loc, lfunc_args_and_kwargs=([], {"key": key, "method": method}), rfunc_args_and_kwargs=([], {"key": key, "method": method}), - compare_error_message=False, ) else: with expect_warning_if(method is not None): @@ -2089,7 +2085,6 @@ def test_get_loc_single_unique_string(idx, key, method): rfunc=gi.get_loc, lfunc_args_and_kwargs=([], {"key": key, "method": method}), rfunc_args_and_kwargs=([], {"key": key, "method": method}), - compare_error_message=False, ) else: with expect_warning_if(method is not None): @@ -2115,7 +2110,6 @@ def test_get_loc_single_duplicate_string(idx, key, method): rfunc=gi.get_loc, lfunc_args_and_kwargs=([], {"key": key, "method": method}), rfunc_args_and_kwargs=([], {"key": key, "method": method}), - compare_error_message=False, ) else: with expect_warning_if(method is not None): @@ -2152,7 +2146,6 @@ def test_get_loc_multi_numeric(idx, key, method): rfunc=gi.get_loc, lfunc_args_and_kwargs=([], {"key": key, "method": method}), rfunc_args_and_kwargs=([], {"key": key, "method": method}), - compare_error_message=False, ) else: with expect_warning_if(method is not None): @@ -2200,7 +2193,6 @@ def test_get_loc_multi_numeric_deviate(idx, key, result, method): rfunc=gi.get_loc, lfunc_args_and_kwargs=([], {"key": key, "method": method}), rfunc_args_and_kwargs=([], {"key": key, "method": method}), - compare_error_message=False, ) else: expected = result @@ -2279,7 +2271,6 @@ def test_get_loc_multi_string(idx, key, method): rfunc=gi.get_loc, lfunc_args_and_kwargs=([], {"key": key, "method": method}), rfunc_args_and_kwargs=([], {"key": key, "method": method}), - compare_error_message=False, ) else: with expect_warning_if(method is not None): diff --git a/python/cudf/cudf/tests/test_indexing.py b/python/cudf/cudf/tests/test_indexing.py index 8cf93ac9d1d..b5aebfaf352 100644 --- a/python/cudf/cudf/tests/test_indexing.py +++ b/python/cudf/cudf/tests/test_indexing.py @@ -1214,32 +1214,26 @@ def test_out_of_bounds_indexing(): assert_exceptions_equal( lambda: psr[[0, 1, 9]], lambda: gsr[[0, 1, 9]], - compare_error_message=False, ) assert_exceptions_equal( lambda: psr[[0, 1, -4]], lambda: gsr[[0, 1, -4]], - compare_error_message=False, ) assert_exceptions_equal( lambda: psr.__setitem__([0, 1, 9], 2), lambda: gsr.__setitem__([0, 1, 9], 2), - compare_error_message=False, ) assert_exceptions_equal( lambda: psr.__setitem__([0, 1, -4], 2), lambda: gsr.__setitem__([0, 1, -4], 2), - compare_error_message=False, ) assert_exceptions_equal( lambda: psr[4:6].iloc.__setitem__(-1, 2), lambda: gsr[4:6].iloc.__setitem__(-1, 2), - compare_error_message=False, ) assert_exceptions_equal( lambda: psr[4:6].iloc.__setitem__(1, 2), lambda: gsr[4:6].iloc.__setitem__(1, 2), - compare_error_message=False, ) diff --git a/python/cudf/cudf/tests/test_multiindex.py b/python/cudf/cudf/tests/test_multiindex.py index a073e1f55bf..db9d6f5999f 100644 --- a/python/cudf/cudf/tests/test_multiindex.py +++ b/python/cudf/cudf/tests/test_multiindex.py @@ -46,7 +46,6 @@ def test_multiindex_levels_codes_validation(): rfunc=cudf.MultiIndex, lfunc_args_and_kwargs=([levels, [0, 1]],), rfunc_args_and_kwargs=([levels, [0, 1]],), - compare_error_message=False, ) # Codes don't match levels @@ -55,7 +54,6 @@ def test_multiindex_levels_codes_validation(): rfunc=cudf.MultiIndex, lfunc_args_and_kwargs=([levels, [[0], [1], [1]]],), rfunc_args_and_kwargs=([levels, [[0], [1], [1]]],), - compare_error_message=False, ) # Largest code greater than number of levels @@ -64,7 +62,6 @@ def test_multiindex_levels_codes_validation(): rfunc=cudf.MultiIndex, lfunc_args_and_kwargs=([levels, [[0, 1], [0, 2]]],), rfunc_args_and_kwargs=([levels, [[0, 1], [0, 2]]],), - compare_error_message=False, ) # Unequal code lengths @@ -73,12 +70,9 @@ def test_multiindex_levels_codes_validation(): rfunc=cudf.MultiIndex, lfunc_args_and_kwargs=([levels, [[0, 1], [0]]],), rfunc_args_and_kwargs=([levels, [[0, 1], [0]]],), - compare_error_message=False, ) # Didn't pass levels and codes - assert_exceptions_equal( - lfunc=pd.MultiIndex, rfunc=cudf.MultiIndex, compare_error_message=False - ) + assert_exceptions_equal(lfunc=pd.MultiIndex, rfunc=cudf.MultiIndex) # Didn't pass non zero levels and codes assert_exceptions_equal( diff --git a/python/cudf/cudf/tests/test_reductions.py b/python/cudf/cudf/tests/test_reductions.py index b769c3e79df..f6d21099ae5 100644 --- a/python/cudf/cudf/tests/test_reductions.py +++ b/python/cudf/cudf/tests/test_reductions.py @@ -305,6 +305,4 @@ def test_categorical_reductions(op): gsr = cudf.Series([1, 2, 3, None], dtype="category") psr = gsr.to_pandas() - utils.assert_exceptions_equal( - getattr(psr, op), getattr(gsr, op), compare_error_message=False - ) + utils.assert_exceptions_equal(getattr(psr, op), getattr(gsr, op)) diff --git a/python/cudf/cudf/tests/test_replace.py b/python/cudf/cudf/tests/test_replace.py index feb04669876..fb99c4112b8 100644 --- a/python/cudf/cudf/tests/test_replace.py +++ b/python/cudf/cudf/tests/test_replace.py @@ -1067,7 +1067,6 @@ def test_replace_df_error(): rfunc=gdf.replace, lfunc_args_and_kwargs=([], {"to_replace": -1, "value": []}), rfunc_args_and_kwargs=([], {"to_replace": -1, "value": []}), - compare_error_message=False, ) diff --git a/python/cudf/cudf/tests/test_setitem.py b/python/cudf/cudf/tests/test_setitem.py index 4b1501bc5ca..323759a053d 100644 --- a/python/cudf/cudf/tests/test_setitem.py +++ b/python/cudf/cudf/tests/test_setitem.py @@ -215,7 +215,6 @@ def test_column_set_unequal_length_object_by_mask(): gsr.__setitem__, ([mask, replace_data_1], {}), ([mask, replace_data_1], {}), - compare_error_message=False, ) psr = pd.Series(data) @@ -225,7 +224,6 @@ def test_column_set_unequal_length_object_by_mask(): gsr.__setitem__, ([mask, replace_data_2], {}), ([mask, replace_data_2], {}), - compare_error_message=False, ) @@ -239,7 +237,6 @@ def test_categorical_setitem_invalid(): rfunc=gs.__setitem__, lfunc_args_and_kwargs=([0, 5], {}), rfunc_args_and_kwargs=([0, 5], {}), - compare_error_message=False, ) else: # Following workaround is needed because: diff --git a/python/cudf/cudf/tests/test_stats.py b/python/cudf/cudf/tests/test_stats.py index 5861f67919b..33a136a6baf 100644 --- a/python/cudf/cudf/tests/test_stats.py +++ b/python/cudf/cudf/tests/test_stats.py @@ -575,7 +575,6 @@ def test_cov_corr_invalid_dtypes(gsr): rfunc=gsr.corr, lfunc_args_and_kwargs=([psr],), rfunc_args_and_kwargs=([gsr],), - compare_error_message=False, ) assert_exceptions_equal( @@ -583,7 +582,6 @@ def test_cov_corr_invalid_dtypes(gsr): rfunc=gsr.cov, lfunc_args_and_kwargs=([psr],), rfunc_args_and_kwargs=([gsr],), - compare_error_message=False, ) diff --git a/python/cudf/cudf/tests/test_string.py b/python/cudf/cudf/tests/test_string.py index 401b93525eb..4006a8add56 100644 --- a/python/cudf/cudf/tests/test_string.py +++ b/python/cudf/cudf/tests/test_string.py @@ -2587,7 +2587,6 @@ def test_string_typecast_error(data, obj_type, dtype): rfunc=gsr.astype, lfunc_args_and_kwargs=([dtype],), rfunc_args_and_kwargs=([dtype],), - compare_error_message=False, ) @@ -2987,18 +2986,14 @@ def test_string_var(): psr = pd.Series(["1", "2", "3", "4", "5"]) sr = cudf.Series(["1", "2", "3", "4", "5"]) - assert_exceptions_equal( - lfunc=psr.var, rfunc=sr.var, compare_error_message=False - ) + assert_exceptions_equal(lfunc=psr.var, rfunc=sr.var) def test_string_std(): psr = pd.Series(["1", "2", "3", "4", "5"]) sr = cudf.Series(["1", "2", "3", "4", "5"]) - assert_exceptions_equal( - lfunc=psr.std, rfunc=sr.std, compare_error_message=False - ) + assert_exceptions_equal(lfunc=psr.std, rfunc=sr.std) def test_string_slice_with_mask(): diff --git a/python/cudf/cudf/tests/test_timedelta.py b/python/cudf/cudf/tests/test_timedelta.py index 3e4dc50af20..f5181ef4d8d 100644 --- a/python/cudf/cudf/tests/test_timedelta.py +++ b/python/cudf/cudf/tests/test_timedelta.py @@ -345,7 +345,6 @@ def test_timedelta_ops_datetime_inputs( rfunc=operator.sub, lfunc_args_and_kwargs=([psr_timedelta, psr_datetime],), rfunc_args_and_kwargs=([gsr_timedelta, gsr_datetime],), - compare_error_message=False, ) @@ -1259,7 +1258,6 @@ def test_timedelta_invalid_ops(): rfunc=operator.add, lfunc_args_and_kwargs=([psr, 1],), rfunc_args_and_kwargs=([sr, 1],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1267,7 +1265,6 @@ def test_timedelta_invalid_ops(): rfunc=operator.add, lfunc_args_and_kwargs=([psr, "a"],), rfunc_args_and_kwargs=([sr, "a"],), - compare_error_message=False, ) dt_sr = cudf.Series([1, 2, 3], dtype="datetime64[ns]") @@ -1278,7 +1275,6 @@ def test_timedelta_invalid_ops(): rfunc=operator.mod, lfunc_args_and_kwargs=([psr, dt_psr],), rfunc_args_and_kwargs=([sr, dt_sr],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1287,7 +1283,6 @@ def test_timedelta_invalid_ops(): lfunc_args_and_kwargs=([psr, "a"],), rfunc_args_and_kwargs=([sr, "a"],), check_exception_type=False, - compare_error_message=False, ) assert_exceptions_equal( @@ -1295,7 +1290,6 @@ def test_timedelta_invalid_ops(): rfunc=operator.gt, lfunc_args_and_kwargs=([psr, dt_psr],), rfunc_args_and_kwargs=([sr, dt_sr],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1303,7 +1297,6 @@ def test_timedelta_invalid_ops(): rfunc=operator.lt, lfunc_args_and_kwargs=([psr, dt_psr],), rfunc_args_and_kwargs=([sr, dt_sr],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1311,7 +1304,6 @@ def test_timedelta_invalid_ops(): rfunc=operator.ge, lfunc_args_and_kwargs=([psr, dt_psr],), rfunc_args_and_kwargs=([sr, dt_sr],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1319,7 +1311,6 @@ def test_timedelta_invalid_ops(): rfunc=operator.le, lfunc_args_and_kwargs=([psr, dt_psr],), rfunc_args_and_kwargs=([sr, dt_sr],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1327,7 +1318,6 @@ def test_timedelta_invalid_ops(): rfunc=operator.truediv, lfunc_args_and_kwargs=([psr, dt_psr],), rfunc_args_and_kwargs=([sr, dt_sr],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1335,7 +1325,6 @@ def test_timedelta_invalid_ops(): rfunc=operator.floordiv, lfunc_args_and_kwargs=([psr, dt_psr],), rfunc_args_and_kwargs=([sr, dt_sr],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1343,7 +1332,6 @@ def test_timedelta_invalid_ops(): rfunc=operator.mul, lfunc_args_and_kwargs=([psr, dt_psr],), rfunc_args_and_kwargs=([sr, dt_sr],), - compare_error_message=False, ) assert_exceptions_equal( @@ -1352,7 +1340,6 @@ def test_timedelta_invalid_ops(): lfunc_args_and_kwargs=([psr, psr],), rfunc_args_and_kwargs=([sr, sr],), check_exception_type=False, - compare_error_message=False, ) assert_exceptions_equal( @@ -1360,7 +1347,6 @@ def test_timedelta_invalid_ops(): rfunc=operator.xor, lfunc_args_and_kwargs=([psr, psr],), rfunc_args_and_kwargs=([sr, sr],), - compare_error_message=False, ) From 83829c905853849e19cad8b851f1ddb0f15895a0 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 4 Jan 2023 11:39:10 -0800 Subject: [PATCH 3/3] Update copyrights. --- python/cudf/cudf/testing/_utils.py | 2 +- python/cudf/cudf/tests/test_categorical.py | 2 +- python/cudf/cudf/tests/test_column.py | 2 +- python/cudf/cudf/tests/test_concat.py | 2 +- python/cudf/cudf/tests/test_csv.py | 2 +- python/cudf/cudf/tests/test_dataframe.py | 2 +- python/cudf/cudf/tests/test_datetime.py | 2 +- python/cudf/cudf/tests/test_duplicates.py | 2 +- python/cudf/cudf/tests/test_groupby.py | 2 +- python/cudf/cudf/tests/test_index.py | 2 +- python/cudf/cudf/tests/test_indexing.py | 2 +- python/cudf/cudf/tests/test_multiindex.py | 2 +- python/cudf/cudf/tests/test_quantiles.py | 2 +- python/cudf/cudf/tests/test_reductions.py | 2 +- python/cudf/cudf/tests/test_replace.py | 2 +- python/cudf/cudf/tests/test_series.py | 2 +- python/cudf/cudf/tests/test_seriesmap.py | 2 +- python/cudf/cudf/tests/test_setitem.py | 2 +- python/cudf/cudf/tests/test_sorting.py | 2 +- python/cudf/cudf/tests/test_stats.py | 2 +- python/cudf/cudf/tests/test_string.py | 2 +- python/cudf/cudf/tests/test_timedelta.py | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/python/cudf/cudf/testing/_utils.py b/python/cudf/cudf/testing/_utils.py index 302c37cb0f7..ee3dbd85131 100644 --- a/python/cudf/cudf/testing/_utils.py +++ b/python/cudf/cudf/testing/_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2023, NVIDIA CORPORATION. import itertools import warnings diff --git a/python/cudf/cudf/tests/test_categorical.py b/python/cudf/cudf/tests/test_categorical.py index 2e66926b346..fa8981cf7e3 100644 --- a/python/cudf/cudf/tests/test_categorical.py +++ b/python/cudf/cudf/tests/test_categorical.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2023, NVIDIA CORPORATION. import operator import string diff --git a/python/cudf/cudf/tests/test_column.py b/python/cudf/cudf/tests/test_column.py index 9896dfd7ad2..75b82baf2e8 100644 --- a/python/cudf/cudf/tests/test_column.py +++ b/python/cudf/cudf/tests/test_column.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2023, NVIDIA CORPORATION. import cupy as cp import numpy as np diff --git a/python/cudf/cudf/tests/test_concat.py b/python/cudf/cudf/tests/test_concat.py index 3b39f307d5f..e8b863fdaea 100644 --- a/python/cudf/cudf/tests/test_concat.py +++ b/python/cudf/cudf/tests/test_concat.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2023, NVIDIA CORPORATION. from decimal import Decimal diff --git a/python/cudf/cudf/tests/test_csv.py b/python/cudf/cudf/tests/test_csv.py index cdb8939a508..249c4e26a86 100644 --- a/python/cudf/cudf/tests/test_csv.py +++ b/python/cudf/cudf/tests/test_csv.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2023, NVIDIA CORPORATION. import gzip import os diff --git a/python/cudf/cudf/tests/test_dataframe.py b/python/cudf/cudf/tests/test_dataframe.py index 6db2961e002..8cb00187895 100644 --- a/python/cudf/cudf/tests/test_dataframe.py +++ b/python/cudf/cudf/tests/test_dataframe.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2023, NVIDIA CORPORATION. import array as arr import datetime diff --git a/python/cudf/cudf/tests/test_datetime.py b/python/cudf/cudf/tests/test_datetime.py index dd174abf770..5616cea42ba 100644 --- a/python/cudf/cudf/tests/test_datetime.py +++ b/python/cudf/cudf/tests/test_datetime.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2022, NVIDIA CORPORATION. +# Copyright (c) 2019-2023, NVIDIA CORPORATION. import datetime import operator diff --git a/python/cudf/cudf/tests/test_duplicates.py b/python/cudf/cudf/tests/test_duplicates.py index 0ab71b4f8d5..8a83ec150bc 100644 --- a/python/cudf/cudf/tests/test_duplicates.py +++ b/python/cudf/cudf/tests/test_duplicates.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2023, NVIDIA CORPORATION. import itertools import random diff --git a/python/cudf/cudf/tests/test_groupby.py b/python/cudf/cudf/tests/test_groupby.py index 97ce06af949..79a76f30c1e 100644 --- a/python/cudf/cudf/tests/test_groupby.py +++ b/python/cudf/cudf/tests/test_groupby.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2023, NVIDIA CORPORATION. import datetime import itertools diff --git a/python/cudf/cudf/tests/test_index.py b/python/cudf/cudf/tests/test_index.py index fb645621326..5b0eca1c635 100644 --- a/python/cudf/cudf/tests/test_index.py +++ b/python/cudf/cudf/tests/test_index.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2023, NVIDIA CORPORATION. """ Test related to Index diff --git a/python/cudf/cudf/tests/test_indexing.py b/python/cudf/cudf/tests/test_indexing.py index b5aebfaf352..634466e92a3 100644 --- a/python/cudf/cudf/tests/test_indexing.py +++ b/python/cudf/cudf/tests/test_indexing.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# Copyright (c) 2021-2023, NVIDIA CORPORATION. from itertools import combinations diff --git a/python/cudf/cudf/tests/test_multiindex.py b/python/cudf/cudf/tests/test_multiindex.py index db9d6f5999f..d27d6732226 100644 --- a/python/cudf/cudf/tests/test_multiindex.py +++ b/python/cudf/cudf/tests/test_multiindex.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2022, NVIDIA CORPORATION. +# Copyright (c) 2019-2023, NVIDIA CORPORATION. """ Test related to MultiIndex diff --git a/python/cudf/cudf/tests/test_quantiles.py b/python/cudf/cudf/tests/test_quantiles.py index eddbc80bf19..53b06e64a91 100644 --- a/python/cudf/cudf/tests/test_quantiles.py +++ b/python/cudf/cudf/tests/test_quantiles.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2023, NVIDIA CORPORATION. import re diff --git a/python/cudf/cudf/tests/test_reductions.py b/python/cudf/cudf/tests/test_reductions.py index f6d21099ae5..4b45b27968d 100644 --- a/python/cudf/cudf/tests/test_reductions.py +++ b/python/cudf/cudf/tests/test_reductions.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2023, NVIDIA CORPORATION. from decimal import Decimal diff --git a/python/cudf/cudf/tests/test_replace.py b/python/cudf/cudf/tests/test_replace.py index fb99c4112b8..9e93dd6d227 100644 --- a/python/cudf/cudf/tests/test_replace.py +++ b/python/cudf/cudf/tests/test_replace.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2023, NVIDIA CORPORATION. import re from decimal import Decimal diff --git a/python/cudf/cudf/tests/test_series.py b/python/cudf/cudf/tests/test_series.py index 0065c9f8f3f..6a1245a1582 100644 --- a/python/cudf/cudf/tests/test_series.py +++ b/python/cudf/cudf/tests/test_series.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2023, NVIDIA CORPORATION. import hashlib import operator diff --git a/python/cudf/cudf/tests/test_seriesmap.py b/python/cudf/cudf/tests/test_seriesmap.py index 339a7a05b86..9da08e483c9 100644 --- a/python/cudf/cudf/tests/test_seriesmap.py +++ b/python/cudf/cudf/tests/test_seriesmap.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2023, NVIDIA CORPORATION. from itertools import product from math import floor diff --git a/python/cudf/cudf/tests/test_setitem.py b/python/cudf/cudf/tests/test_setitem.py index 323759a053d..6b2fb90e95b 100644 --- a/python/cudf/cudf/tests/test_setitem.py +++ b/python/cudf/cudf/tests/test_setitem.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2023, NVIDIA CORPORATION. import numpy as np import pandas as pd diff --git a/python/cudf/cudf/tests/test_sorting.py b/python/cudf/cudf/tests/test_sorting.py index 9bd0b9c38ed..cd0c3bc8806 100644 --- a/python/cudf/cudf/tests/test_sorting.py +++ b/python/cudf/cudf/tests/test_sorting.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2023, NVIDIA CORPORATION. import string from itertools import product diff --git a/python/cudf/cudf/tests/test_stats.py b/python/cudf/cudf/tests/test_stats.py index 33a136a6baf..715d17169a6 100644 --- a/python/cudf/cudf/tests/test_stats.py +++ b/python/cudf/cudf/tests/test_stats.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2023, NVIDIA CORPORATION. from concurrent.futures import ThreadPoolExecutor diff --git a/python/cudf/cudf/tests/test_string.py b/python/cudf/cudf/tests/test_string.py index 8b280d6baee..5e073197309 100644 --- a/python/cudf/cudf/tests/test_string.py +++ b/python/cudf/cudf/tests/test_string.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2023, NVIDIA CORPORATION. import json import re diff --git a/python/cudf/cudf/tests/test_timedelta.py b/python/cudf/cudf/tests/test_timedelta.py index f5181ef4d8d..b4d014c9949 100644 --- a/python/cudf/cudf/tests/test_timedelta.py +++ b/python/cudf/cudf/tests/test_timedelta.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2023, NVIDIA CORPORATION. import datetime import operator