8000 TST: update and enable 'default' style tests by tacaswell · Pull Request #6757 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

TST: update and enable 'default' style tests #6757

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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use fixed random seed for tests using bootstrapping.
Bootstrapping requires random sampling, so it needs a fixed seed to
ensure test consistency.
  • Loading branch information
QuLogic committed Sep 10, 2016
commit 26774ca2378865f4b6e32034ce28b32b55409c6a
15 changes: 15 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1815,6 +1815,9 @@ def test_bxp_bad_positions():
tol=1,
style='default')
def test_boxplot():
# Randomness used for bootstrapping.
np.random.seed(937)

x = np.linspace(-7, 7, 140)
x = np.hstack([-25, x, 25])
fig, ax = plt.subplots()
Expand All @@ -1833,6 +1836,9 @@ def test_boxplot():
remove_text=True, extensions=['png'],
style='default')
def test_boxplot_sym2():
# Randomness used for bootstrapping.
np.random.seed(937)

x = np.linspace(-7, 7, 140)
x = np.hstack([-25, x, 25])
fig, [ax1, ax2] = plt.subplots(1, 2)
Expand Down Expand Up @@ -1864,6 +1870,9 @@ def test_boxplot_sym():
style='default'
)
def test_boxplot_autorange_whiskers():
# Randomness used for bootstrapping.
np.random.seed(937)

x = np.ones(140)
x = np.hstack([0, x, 2])

Expand All @@ -1886,6 +1895,9 @@ def _rc_test_bxp_helper(ax, rc_dict):
savefig_kwarg={'dpi': 100}, remove_text=True,
tol=1, style='default')
def test_boxplot_rc_parameters():
# Randomness used for bootstrapping.
np.random.seed(937)

fig, ax = plt.subplots(3)

rc_axis0 = {
Expand Down Expand Up @@ -1948,6 +1960,9 @@ def test_boxplot_rc_parameters():
remove_text=True, extensions=['png'],
savefig_kwarg={'dpi': 40}, style='default')
def test_boxplot_with_CIarray():
# Randomness used for bootstrapping.
np.random.seed(937)

x = np.linspace(-7, 7, 140)
x = np.hstack([-25, x, 25])
fig = plt.figure()
Expand Down
0