Skip to content

Commit 32a3bb9

Browse files
authored
Merge pull request #431 from nschloe/fix-tests
Fix tests
2 parents ddf7ae3 + 83e474b commit 32a3bb9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+66
-89
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
lint:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/setup-python@v1
9+
- uses: actions/setup-python@v2
1010
with:
1111
python-version: "3.x"
1212
- uses: actions/checkout@v2
@@ -25,7 +25,7 @@ jobs:
2525
matrix:
2626
python-version: [3.6, 3.7, 3.8]
2727
steps:
28-
- uses: actions/setup-python@v1
28+
- uses: actions/setup-python@v2
2929
with:
3030
python-version: ${{ matrix.python-version }}
3131
- uses: actions/checkout@v2

Makefile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,11 @@ default:
66
tag:
77
# Make sure we're on the master branch
88
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "master" ]; then exit 1; fi
9-
# @echo "Tagging v$(VERSION)..."
10-
# git tag v$(VERSION)
11-
# git push --tags
129
curl -H "Authorization: token `cat $(HOME)/.github-access-token`" -d '{"tag_name": "v$(VERSION)"}' https://api.github.com/repos/nschloe/tikzplotlib/releases
1310

1411
upload:
1512
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "master" ]; then exit 1; fi
1613
rm -f dist/*
17-
# python3 setup.py sdist bdist_wheel
1814
# https://stackoverflow.com/a/58756491/353337
1915
python3 -m pep517.build --source --binary .
2016
twine upload dist/*
@@ -26,10 +22,7 @@ clean:
2622
@rm -rf *.egg-info/ build/ dist/ MANIFEST
2723

2824
format:
29-
isort -rc .
30-
black .
31-
32-
black:
25+
isort .
3326
black .
3427

3528
lint:

test/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def assert_equality(
4545
this_dir = os.path.dirname(os.path.abspath(__file__))
4646
with open(os.path.join(this_dir, filename), encoding="utf-8") as f:
4747
reference = f.read()
48-
assert reference == code, _unidiff_output(code, reference)
48+
assert reference == code, _unidiff_output(reference, code)
4949

5050
if assert_compilation:
5151
plot()

test/test_annotate.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import matplotlib.pyplot as plt
22
import numpy as np
3-
43
from helpers import assert_equality
54

65

@@ -38,7 +37,6 @@ def plot():
3837

3938
def test():
4039
assert_equality(plot, __file__[:-3] + "_reference.tex")
41-
return
4240

4341

4442
if __name__ == "__main__":

test/test_axvline.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import matplotlib.pyplot as plt
22
import numpy as np
3-
43
from helpers import assert_equality
54

65

test/test_barchart.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"""
66
import matplotlib.pyplot as plt
77
import numpy as np
8-
98
from helpers import assert_equality
109

1110

test/test_barchart_errorbars.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"""
66
import matplotlib.pyplot as plt
77
import numpy as np
8-
98
from helpers import assert_equality
109

1110

test/test_barchart_legend.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"""
1010
import matplotlib.pyplot as plt
1111
import numpy as np
12-
1312
from helpers import assert_equality
1413

1514

@@ -34,7 +33,6 @@ def plot():
3433

3534
def test():
3635
assert_equality(plot, "test_barchart_legend_reference.tex")
37-
return
3836

3937

4038
if __name__ == "__main__":

test/test_basic_sin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import matplotlib.pyplot as plt
22
import numpy as np
3-
43
from helpers import assert_equality
54

65

test/test_boxplot.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
See: https://github.com/nschloe/tikzplotlib/pull/134
77
"""
88
import matplotlib.pyplot as plt
9-
109
from helpers import assert_equality
1110

1211

0 commit comments

Comments
 (0)