Skip to content

TST: Dynamically use doctest_namespace only if running the doctest #45667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 28, 2022

Conversation

mroeschke
Copy link
Member

  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them

Will probably speed up the test suite. Example locally with running pandas/tests/window/moments

Main

======================================================================= slowest 30 durations =======================================================================
0.07s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data4-True-False-0]
0.06s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_std[all_data9-False-False-2-False]
0.06s teardown pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data4-False-True-2]
0.05s teardown pandas/tests/window/moments/test_moments_consistency_rolling.py::test_rolling_consistency_var_debiasing_factors[all_data17-rolling_consistency_cases1-False]
0.03s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data3-False-False-2]
0.03s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data6-False-False-0]
0.03s setup    pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data3-False-True-0]
0.03s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data11-False-False-2]
0.03s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data3-False-False-0]
0.03s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data5-False-False-2]
0.03s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data7-True-True-0]
0.03s setup    pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data5-True-False-2]
0.03s setup    pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data6-False-False-0]
0.03s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data11-False-False-0]
0.02s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data6-True-True-2]
0.02s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data9-True-False-0]
0.02s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data11-True-True-0]
0.02s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data7-True-False-0]
0.02s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data3-False-True-0]
0.02s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data9-False-True-0]
0.02s setup    pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data9-False-False-0]
0.02s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data8-True-True-0]
0.02s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data12-True-False-0]
0.02s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data9-True-False-2]
0.02s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data10-True-False-0]
0.02s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data8-False-False-0]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data8-False-False-2]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data10-False-False-0]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data5-True-True-0]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data10-True-True-0]

This PR

======================================== slowest 30 durations =======================================================================
0.01s call     pandas/tests/window/moments/test_moments_consistency_expanding.py::test_expanding_consistency_var_std_cov[all_data13-2-0]
0.01s call     pandas/tests/window/moments/test_moments_consistency_expanding.py::test_expanding_consistency_var_std_cov[all_data11-2-1]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_var_debiasing_factors[all_data9-True-True-2]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_series_cov_corr[series_data6-True-False-2-True]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_var_debiasing_factors[all_data9-False-False-0]
0.01s call     pandas/tests/window/moments/test_moments_consistency_expanding.py::test_expanding_consistency_var_std_cov[all_data16-2-0]
0.01s call     pandas/tests/window/moments/test_moments_consistency_rolling.py::test_rolling_consistency_series_cov_corr[series_data1-rolling_consistency_cases1-True-0]
0.01s call     pandas/tests/window/moments/test_moments_consistency_rolling.py::test_rolling_consistency_series_cov_corr[series_data5-rolling_consistency_cases0-True-0]
0.01s call     pandas/tests/window/moments/test_moments_consistency_rolling.py::test_rolling_consistency_series_cov_corr[series_data3-rolling_consistency_cases0-False-0]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_var_debiasing_factors[all_data12-False-True-0]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_series_cov_corr[series_data7-False-True-2-True]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_series_cov_corr[series_data2-False-True-0-True]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_series_cov_corr[series_data4-False-True-2-True]
0.01s call     pandas/tests/window/moments/test_moments_consistency_rolling.py::test_rolling_consistency_var_std_cov[all_data17-rolling_consistency_cases1-True-1]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_mean[all_data4-False-False-0]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_series_cov_corr[series_data5-False-True-0-True]
0.01s call     pandas/tests/window/moments/test_moments_consistency_rolling.py::test_rolling_consistency_var_std_cov[all_data9-rolling_consistency_cases0-True-0]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_series_cov_corr[series_data6-False-False-0-True]
0.01s call     pandas/tests/window/moments/test_moments_consistency_expanding.py::test_expanding_consistency_var_std_cov[all_data14-2-1]
0.01s call     pandas/tests/window/moments/test_moments_consistency_rolling.py::test_rolling_consistency_var_debiasing_factors[all_data9-rolling_consistency_cases1-True]
0.01s call     pandas/tests/window/moments/test_moments_consistency_rolling.py::test_rolling_consistency_series_cov_corr[series_data6-rolling_consistency_cases1-False-0]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_var_debiasing_factors[all_data13-True-False-2]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_std[all_data14-False-True-0-False]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_std[all_data16-True-False-2-True]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_series_cov_corr[series_data5-True-True-0-False]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_std[all_data9-False-True-0-False]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_moments_consistency_var_constant[consistent_data3-True-True-0-False]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_std[all_data9-True-True-0-False]
0.01s call     pandas/tests/window/moments/test_moments_consistency_expanding.py::test_expanding_consistency_var_std_cov[all_data6-2-0]
0.01s call     pandas/tests/window/moments/test_moments_consistency_ewm.py::test_ewm_consistency_var_debiasing_factors[all_data10-False-True-2]

@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Jan 28, 2022
@mroeschke mroeschke added this to the 1.5 milestone Jan 28, 2022
@mroeschke
Copy link
Member Author

cc @jreback green and should speed up the CI tests

@jreback
Copy link
Contributor

jreback commented Jan 28, 2022

backport?

@mroeschke
Copy link
Member Author

Hmm might be a good idea but not critical since this is not a CI-configuration change per se.

@jreback jreback modified the milestones: 1.5, 1.4.1 Jan 28, 2022
@jreback jreback merged commit e6e1955 into pandas-dev:main Jan 28, 2022
@jreback
Copy link
Contributor

jreback commented Jan 28, 2022

let's try

@jreback
Copy link
Contributor

jreback commented Jan 28, 2022

@meeseeksdev backport 1.4.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jan 28, 2022

Something went wrong ... Please have a look at my logs.

@mroeschke mroeschke deleted the tst/dynamic_doctest branch January 28, 2022 22:29
phofl pushed a commit that referenced this pull request Jan 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants