Skip to content

Commit 7205b0e

Browse files
authored
Merge pull request #115 from cphyc/remove-testing-on-old-python
Fix answer tests
2 parents 5a83668 + 47ea790 commit 7205b0e

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.github/workflows/pytest.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.8", "3.9", "3.10"]
18+
python-version: ["3.10", "3.11"]
1919

2020
steps:
2121
- uses: actions/checkout@v3
-720 Bytes
Loading

labellines/test.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def test_xlogspace(setup_mpl):
6161

6262
@pytest.mark.mpl_image_compare
6363
def test_xylogspace(setup_mpl):
64-
x = np.geomspace(1e-1, 1e1)
64+
x = np.geomspace(0.1, 1e1)
6565
K = np.arange(-5, 5, 2)
6666

6767
for k in K:
@@ -73,6 +73,9 @@ def test_xylogspace(setup_mpl):
7373
plt.xlabel("$x$")
7474
plt.ylabel("$f(x)$")
7575
plt.ylim(1e-6, 1e6)
76+
# We need to fix the xlims to prevent funky xlims
77+
# see PR #115
78+
plt.xlim(0.1 / 1.2, 1e1 * 1.2)
7679
return plt.gcf()
7780

7881

0 commit comments

Comments
 (0)