diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index c37fcb3defb12..b472587d8b58f 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -26,77 +26,76 @@ jobs: timeout-minutes: 180 strategy: matrix: - env_file: []#[actions-39.yaml, actions-310.yaml, actions-311.yaml, actions-312.yaml] + env_file: [actions-39.yaml, actions-310.yaml, actions-311.yaml, actions-312.yaml] # Prevent the include jobs from overriding other jobs pattern: [""] include: -# - name: "Downstream Compat" -# env_file: actions-311-downstream_compat.yaml -# pattern: "not slow and not network and not single_cpu" -# pytest_target: "pandas/tests/test_downstream.py" + - name: "Downstream Compat" + env_file: actions-311-downstream_compat.yaml + pattern: "not slow and not network and not single_cpu" + pytest_target: "pandas/tests/test_downstream.py" - name: "Minimum Versions" env_file: actions-39-minimum_versions.yaml pattern: "not slow and not network and not single_cpu" - pytest_target: "pandas/tests/dtypes/test_common.py" - name: "Locale: it_IT" -# env_file: actions-311.yaml -# pattern: "not slow and not network and not single_cpu" -# extra_apt: "language-pack-it" -# # Use the utf8 version as the default, it has no bad side-effect. -# lang: "it_IT.utf8" -# lc_all: "it_IT.utf8" -# # Also install it_IT (its encoding is ISO8859-1) but do not activate it. -# # It will be temporarily activated during tests with locale.setlocale -# extra_loc: "it_IT" -# - name: "Locale: zh_CN" -# env_file: actions-311.yaml -# pattern: "not slow and not network and not single_cpu" -# extra_apt: "language-pack-zh-hans" -# # Use the utf8 version as the default, it has no bad side-effect. -# lang: "zh_CN.utf8" -# lc_all: "zh_CN.utf8" -# # Also install zh_CN (its encoding is gb2312) but do not activate it. -# # It will be temporarily activated during tests with locale.setlocale -# extra_loc: "zh_CN" -# - name: "Copy-on-Write 3.9" -# env_file: actions-39.yaml -# pattern: "not slow and not network and not single_cpu" -# pandas_copy_on_write: "1" -# - name: "Copy-on-Write 3.10" -# env_file: actions-310.yaml -# pattern: "not slow and not network and not single_cpu" -# pandas_copy_on_write: "1" -# - name: "Copy-on-Write 3.11" -# env_file: actions-311.yaml -# pattern: "not slow and not network and not single_cpu" -# pandas_copy_on_write: "1" -# - name: "Copy-on-Write 3.12" -# env_file: actions-312.yaml -# pattern: "not slow and not network and not single_cpu" -# pandas_copy_on_write: "1" -# - name: "Copy-on-Write 3.11 (warnings)" -# env_file: actions-311.yaml -# pattern: "not slow and not network and not single_cpu" -# pandas_copy_on_write: "warn" -# - name: "Copy-on-Write 3.10 (warnings)" -# env_file: actions-310.yaml -# pattern: "not slow and not network and not single_cpu" -# pandas_copy_on_write: "warn" -# - name: "Copy-on-Write 3.9 (warnings)" -# env_file: actions-39.yaml -# pattern: "not slow and not network and not single_cpu" -# pandas_copy_on_write: "warn" -# - name: "Pypy" -# env_file: actions-pypy-39.yaml -# pattern: "not slow and not network and not single_cpu" -# test_args: "--max-worker-restart 0" -# - name: "Numpy Dev" -# env_file: actions-311-numpydev.yaml -# pattern: "not slow and not network and not single_cpu" -# test_args: "-W error::DeprecationWarning -W error::FutureWarning" -# - name: "Pyarrow Nightly" -# env_file: actions-311-pyarrownightly.yaml -# pattern: "not slow and not network and not single_cpu" + env_file: actions-311.yaml + pattern: "not slow and not network and not single_cpu" + extra_apt: "language-pack-it" + # Use the utf8 version as the default, it has no bad side-effect. + lang: "it_IT.utf8" + lc_all: "it_IT.utf8" + # Also install it_IT (its encoding is ISO8859-1) but do not activate it. + # It will be temporarily activated during tests with locale.setlocale + extra_loc: "it_IT" + - name: "Locale: zh_CN" + env_file: actions-311.yaml + pattern: "not slow and not network and not single_cpu" + extra_apt: "language-pack-zh-hans" + # Use the utf8 version as the default, it has no bad side-effect. + lang: "zh_CN.utf8" + lc_all: "zh_CN.utf8" + # Also install zh_CN (its encoding is gb2312) but do not activate it. + # It will be temporarily activated during tests with locale.setlocale + extra_loc: "zh_CN" + - name: "Copy-on-Write 3.9" + env_file: actions-39.yaml + pattern: "not slow and not network and not single_cpu" + pandas_copy_on_write: "1" + - name: "Copy-on-Write 3.10" + env_file: actions-310.yaml + pattern: "not slow and not network and not single_cpu" + pandas_copy_on_write: "1" + - name: "Copy-on-Write 3.11" + env_file: actions-311.yaml + pattern: "not slow and not network and not single_cpu" + pandas_copy_on_write: "1" + - name: "Copy-on-Write 3.12" + env_file: actions-312.yaml + pattern: "not slow and not network and not single_cpu" + pandas_copy_on_write: "1" + - name: "Copy-on-Write 3.11 (warnings)" + env_file: actions-311.yaml + pattern: "not slow and not network and not single_cpu" + pandas_copy_on_write: "warn" + - name: "Copy-on-Write 3.10 (warnings)" + env_file: actions-310.yaml + pattern: "not slow and not network and not single_cpu" + pandas_copy_on_write: "warn" + - name: "Copy-on-Write 3.9 (warnings)" + env_file: actions-39.yaml + pattern: "not slow and not network and not single_cpu" + pandas_copy_on_write: "warn" + - name: "Pypy" + env_file: actions-pypy-39.yaml + pattern: "not slow and not network and not single_cpu" + test_args: "--max-worker-restart 0" + - name: "Numpy Dev" + env_file: actions-311-numpydev.yaml + pattern: "not slow and not network and not single_cpu" + test_args: "-W error::DeprecationWarning -W error::FutureWarning" + - name: "Pyarrow Nightly" + env_file: actions-311-pyarrownightly.yaml + pattern: "not slow and not network and not single_cpu" fail-fast: false name: ${{ matrix.name || format('ubuntu-latest {0}', matrix.env_file) }} env: diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 39c885afbe1ef..6a70ea1df3e71 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -11,7 +11,7 @@ echo PYTHONHASHSEED=$PYTHONHASHSEED COVERAGE="-s --cov=pandas --cov-report=xml --cov-append --cov-config=pyproject.toml" # TODO: Support NEP 50 and remove NPY_PROMOTION_STATE -PYTEST_CMD="NPY_PROMOTION_STATE=legacy MESONPY_EDITABLE_VERBOSE=1 PYTHONDEVMODE=1 PYTHONWARNDEFAULTENCODING=1 pytest -v -r fEs -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET" +PYTEST_CMD="NPY_PROMOTION_STATE=legacy MESONPY_EDITABLE_VERBOSE=1 PYTHONDEVMODE=1 PYTHONWARNDEFAULTENCODING=1 pytest -r fEs -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET" if [[ "$PATTERN" ]]; then PYTEST_CMD="$PYTEST_CMD -m \"$PATTERN\"" diff --git a/pandas/core/dtypes/common.py b/pandas/core/dtypes/common.py index d9a2be4f2089b..143dc46359af5 100644 --- a/pandas/core/dtypes/common.py +++ b/pandas/core/dtypes/common.py @@ -1384,7 +1384,6 @@ def _is_dtype(arr_or_dtype, condition) -> bool: dtype = _get_dtype(arr_or_dtype) except (TypeError, ValueError): return False - print(dtype) return condition(dtype)