-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test plotting and catch quilt error (#79)
* add plotting tests * catch error when quilt data have been updated on the server * typo in requirements_tests * include geosnap image
- Loading branch information
Showing
5 changed files
with
62 additions
and
36 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from context import analyze, data | ||
import matplotlib | ||
import pytest | ||
#matplotlib.use('agg') | ||
|
||
from matplotlib.testing.decorators import image_comparison | ||
import matplotlib.pyplot as plt | ||
|
||
@pytest.mark.mpl_image_compare | ||
def test_plot(): | ||
fig, ax = plt.subplots() | ||
sd = data.Community(name='sd', source='ltdb', cbsafips='41740') | ||
sd_clusters = analyze.cluster(sd, columns=['median_household_income', 'p_poverty_rate', 'p_edu_college_greater', 'p_unemployment_rate'], method='kmeans') | ||
sd_clusters.plot(column='kmeans', ax=ax) | ||
return fig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ nose-exclude | |
coverage | ||
coveralls | ||
matplotlib | ||
pytest-mpl |