From 1da1ed24cfba8a051b6c2f452a67ebfee77ca040 Mon Sep 17 00:00:00 2001 From: Felix Gruber Date: Sun, 23 Apr 2023 15:42:19 +0200 Subject: [PATCH] Use dufte style from matplotx. The stand-alone dufte package has been deprecated in favor of the dufte style that has been integrated into matplotx. --- tests/test_dot.py | 10 +++++----- tests/test_sums.py | 12 ++++++------ tox.ini | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/test_dot.py b/tests/test_dot.py index 0a40a0c..a8160fe 100644 --- a/tests/test_dot.py +++ b/tests/test_dot.py @@ -1,5 +1,5 @@ -import dufte import matplotlib.pyplot as plt +import matplotx import numpy as np import perfplot import pytest @@ -33,7 +33,7 @@ def test_fdot(cond): def test_accuracy_comparison_illcond(target_cond=None): - plt.style.use(dufte.style) + plt.style.use(matplotx.styles.dufte) if target_cond is None: target_cond = [10 ** k for k in range(2)] @@ -61,13 +61,13 @@ def test_accuracy_comparison_illcond(target_cond=None): for label, d in zip(labels, data.T): plt.loglog(condition_numbers, d, label=label) - dufte.legend() + matplotx.line_labels() plt.xlabel("condition number") - dufte.ylabel("relative error") + matplotx.ylabel_top("relative error") def test_speed_comparison1(n_range=None): - plt.style.use(dufte.style) + plt.style.use(matplotx.styles.dufte) if n_range is None: n_range = [2 ** k for k in range(2)] diff --git a/tests/test_sums.py b/tests/test_sums.py index 1c0f6b0..8cd9ddb 100644 --- a/tests/test_sums.py +++ b/tests/test_sums.py @@ -1,5 +1,5 @@ -import dufte import matplotlib.pyplot as plt +import matplotx import numpy as np import perfplot import pytest @@ -32,7 +32,7 @@ def test_fsum(cond): def test_accuracy_comparison_illcond(target_conds=None): - plt.style.use(dufte.style) + plt.style.use(matplotx.styles.dufte) if target_conds is None: target_conds = [10 ** k for k in range(1, 2)] @@ -71,14 +71,14 @@ def test_accuracy_comparison_illcond(target_conds=None): for label, color, d in zip(labels, colors, data.T): plt.loglog(condition_numbers, d, label=label, color=color) - dufte.legend() + matplotx.line_labels() plt.xlabel("condition number") - dufte.ylabel("relative error") + matplotx.ylabel_top("relative error") # plt.gca().set_aspect(1.3) def test_speed_comparison1(n_range=None): - plt.style.use(dufte.style) + plt.style.use(matplotx.styles.dufte) if n_range is None: n_range = [2 ** k for k in range(2)] @@ -109,7 +109,7 @@ def test_speed_comparison1(n_range=None): def test_speed_comparison2(n_range=None): - plt.style.use(dufte.style) + plt.style.use(matplotx.styles.dufte) if n_range is None: n_range = [2 ** k for k in range(2)] diff --git a/tox.ini b/tox.ini index 79a53ec..524b3bc 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ isolated_build = True [testenv] deps = - dufte + matplotx perfplot pytest pytest-cov -- 2.39.2 2ed4308d6a6e3cf'>tests: guix-graph.sh: Fix expected path from emacs to libffi....* tests/guix-graph.sh: Change the expected path from emacs to libffi. `guix graph --path` outputs only one possible path, and the one it outputs for this case has changed. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Josselin Poiret 2023-04-21tests: Fix checks for expected failures....Addresses <https://issues.guix.gnu.org/62406>. With 'set -e', a return status inverted with '!' does not cause the shell to exit immediately. Instead use '&& false' to indicate an expected failure. * tests/guix-archive.sh, tests/guix-build-branch.sh, tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-environment-container.sh, tests/guix-environment.sh, tests/guix-gc.sh, tests/guix-git-authenticate.sh, tests/guix-graph.sh, tests/guix-hash.sh, tests/guix-home.sh, tests/guix-pack-relocatable.sh, tests/guix-pack.sh, tests/guix-package-aliases.sh, tests/guix-package-net.sh, tests/guix-package.sh, tests/guix-refresh.sh, tests/guix-shell.sh, tests/guix-style.sh, tests/guix-system.sh: Replace uses of '! ...' with '... && false' or `test ! ...` as appropriate. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Eric Bavier 2022-01-16tests: Clean up after 'tests/guix-graph.sh'....Fixes a regression introduced in a773c3142dd168e1c4480614d3f5fd9d003954cd, which would lead the first 'trap' to be ignored, thereby leaving 't-guix-graph-*' directories behind it. * tests/guix-graph.sh: Remove first 'trap' line that had no effect; replace second 'trap' line. Ludovic Courtès