Skip to content

Commit

Permalink
Merge pull request #18 from ocefpaf/py3k
Browse files Browse the repository at this point in the history
Python 3 tests.
  • Loading branch information
ocefpaf committed Feb 8, 2016
2 parents 17347e6 + 997c15c commit 8b67ec1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ language: python

env:
- CONDA="python=2.7"
#- CONDA="python=3.4"
#- CONDA="python=3.5"
- CONDA="python=3.4"
- CONDA="python=3.5"

before_install:
- wget http://bit.ly/miniconda -O miniconda.sh
Expand All @@ -14,10 +14,10 @@ before_install:
- travis_retry conda create --yes -n TEST $CONDA --file requirements.txt
- source activate TEST
- conda install --yes --file requirements-dev.txt
# GUI
# GUI.
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"

script:
- python setup.py test
- python setup.py test -a "--verbose"
- find . -type f -name "*.py" | xargs flake8 --max-line-length=100
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
gridgeo
-------

Convert UGRID and SGRID compliant files to a variety of geo-like objects.
The formats currently supported are TopoJSON, GeoJSON, and Shapefile.
Convert ocean numerical models grids,
including UGRID and SGRID compliant files,
to a variety of geo-like objects (GeoJSON, TopoJSON, and Shapefile).
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
flake8
pytest
cython
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
netCDF4 >=1.2.0,<1.2.2
pysgrid
pyugrid
fiona
Expand Down
11 changes: 7 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@


class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.verbose = True
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]

def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []

def run_tests(self):
# Import here, cause outside the eggs aren't loaded.
import pytest
errno = pytest.main(self.test_args)
errno = pytest.main(self.pytest_args)
sys.exit(errno)


Expand Down

0 comments on commit 8b67ec1

Please sign in to comment.