Skip to content

Commit 8acd496

Browse files
authored
Merge pull request #9 from palnabarun/add-pytest-mpl
Adds pytest-mpl
2 parents d0c9798 + d0a720a commit 8acd496

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ cache:
66
- $HOME/.cache/pip
77
- $HOME/.cache/matplotlib
88

9+
env:
10+
global:
11+
- MPLBACKEND=agg
12+
913
matrix:
1014
fast_finish: true
1115
include:
@@ -23,7 +27,7 @@ install:
2327
- python -m pip install -ve .
2428

2529
script:
26-
- coverage run run_tests.py
30+
- pytest --cov=mplaltair --mpl
2731
- coverage report -m
2832
- set -e
2933
- codecov

mplaltair/tests/test_basic.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
import matplotlib.pyplot as plt
2+
13
def test_import():
24
import mplaltair
35
del mplaltair
6+
7+
def test_mpl_figure():
8+
fig = plt.figure()
9+
del fig
10+

run_tests.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

test_requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
vega-datasets>=0.5.0
2+
pytest-mpl>=0.9
3+
pytest-cov>=2.5.1

0 commit comments

Comments
 (0)