Skip to content

Commit

Permalink
Add new tests - Change version - Correctly load requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicoals Chotard committed Jan 18, 2017
1 parent 1d7d705 commit a61928c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion extinctions/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.3"
__version__ = "0.1.4"
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


README = '/'.join(os.path.realpath(__file__).split('/')[:-1]) + '/README.rst'
REQUIREMENTS = '/'.join(os.path.realpath(__file__).split('/')[:-1]) + '/requirements.txt'

# Get __version__ from version.py without importing package itself.
VERSION = open('extinctions/version.py').read().split('"')[1]
Expand Down Expand Up @@ -45,5 +44,5 @@
long_description=open(README).read(),
setup_requires=['pytest-runner'],
tests_require=['pytest'],
install_requires=open(REQUIREMENTS).read().splitlines()
install_requires=open("requirements.txt").read().splitlines()
)
15 changes: 15 additions & 0 deletions tests/test_scripts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""Test the scripts."""

from extinctions import main


def test_get_maps():
"""Test get_maps.py."""
main.get_maps(["--list"])
main.get_maps(["--update", "--select", "sfd"])
main.get_maps(["--update", "--exclude", "green,planck,schlafly,sfd_npg,sfd_spg"])


def test_extinction_plots():
"""Test extinction_plots.y."""
main.extinction_plots(["--hide"])

0 comments on commit a61928c

Please sign in to comment.