Repository navigation
Expand file tree
/
Copy pathrun_tests.py
More file actions
104 lines (99 loc) · 3.02 KB
/
Copy pathrun_tests.py
File metadata and controls
104 lines (99 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
from __future__ import annotations
import subprocess
import sys
TESTS_THAT_NEED_FIX = [
"test_arithmetic_expr_left_literal",
"test_cast",
"test_cast_raises_for_unknown_dtype",
"test_cast_to_enum_v1",
"test_cast_to_enum_vmain",
"test_cast_to_float16",
"test_categorical",
"test_contains_datetime_precision_coerced",
"test_corr_numerical_stability",
"test_cov_numerical_stability",
"test_drop_nulls_agg",
"test_enum",
"test_enum_distinct_from_categorical",
"test_expr_binary",
"test_fill_null_limits",
"test_fill_null_strategies_with_limit_as_none",
"test_fill_null_strategies_with_partition_by",
"test_first_expr_in_group_by",
"test_first_last_different_orders",
"test_float16",
"test_get_field_expr",
"test_group_by_categorical",
"test_is_finite_expr",
"test_kurtosis_expr",
"test_length_changing_error_message",
"test_mapping_key_not_in_expr",
"test_mode_expr_keep_all_lazy",
"test_mode_expr_keep_any",
"test_mode_group_by_multimodal",
"test_mode_group_by_multiple_cols",
"test_mode_group_by_nulls",
"test_mode_group_by_unimodal",
"test_mode_over_nulls",
"test_native_namespace_frame",
"test_numeric_reduction_keeps_dtype_when_all_null",
"test_offset_by",
"test_offset_by_3471",
"test_offset_by_dst",
"test_offset_by_invalid_interval",
"test_offset_by_tz",
"test_over_without_partition_by_categorical",
"test_package_version",
"test_parse_weight",
"test_quantile_expr",
"test_rank_categorical",
"test_rank_with_order_by",
"test_rank_with_order_by_and_partition_by",
"test_replace_strict_expr_basic",
"test_replace_strict_expr_with_default",
"test_replace_strict_non_full",
"test_replace_strict_with_default_and_nulls",
"test_replace_strict_with_default_mapping",
"test_replace_strict_with_expressified_default",
"test_right_arithmetic_expr",
"test_set_ops",
"test_sort_categorical",
"test_sort_categorical_empty",
"test_str_replace_value_edge_expr_scalar",
"test_str_to_titlecase_expr",
"test_to_datetime_fractional_seconds",
"test_to_datetime_infer_fmt",
"test_to_datetime_invalid_raises",
"test_to_datetime_tz_aware",
"test_top_k_categorical",
"test_truncate",
"test_truncate_invalid_interval",
"test_truncate_invalid_multiple",
"test_truncate_multiples",
"test_unique",
"test_unique_expr",
"test_unique_expr_agg",
"test_unique_maintain_order_expr",
"test_with_columns_dtypes_single_row",
"test_with_row_index_order_by_categorical",
]
command = [
"pytest",
"narwhals/tests",
"-p",
"pytest_constructor_override",
"-p",
"env",
"--use-external-constructor",
"--constructors",
"daft",
"-k",
f"not ({' or '.join(TESTS_THAT_NEED_FIX)})",
]
if len(sys.argv) > 1:
command.extend(sys.argv[1:])
try:
subprocess.run(command, check=True)
except subprocess.CalledProcessError as e:
print("Exit code:", e.returncode)
sys.exit(e.returncode)