Skip to content

Commit

Permalink
Formalize API for removing derivatization in IUPAC
Browse files Browse the repository at this point in the history
Also refactored test suite infrastructure using
pytest
  • Loading branch information
mobiusklein committed May 29, 2017
1 parent 5c1208f commit 07bc7d0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ cache: pip
# command to install dependencies
install:
- pip install -U setuptools
- pip install pytest
- pip install cython
- pip install -e .[plot,glyspace]
# - pip install -r requirements.txt
# command to run tests
script: nosetests
script: make test
8 changes: 8 additions & 0 deletions glypy/composition/glycan_composition.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,3 +988,11 @@ def extend(self, *args):

class FrozenError(ValueError):
pass


class HashableGlycanComposition(FrozenGlycanComposition):
def __hash__(self):
return hash(str(self))

def __eq__(self, other):
return str(self) == str(other)
7 changes: 4 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ all: develop test docs


test:
nosetests --with-coverage --with-timer --cover-package=glypy --cover-html --cover-html-dir=test_reports --logging-level=DEBUG -v --with-id glypy/tests/
py.test -v glypy --cov=glypy --cov-report html --cov-report term

retest:
nosetests --cover-package=glypy --logging-level=DEBUG -v --with-id --failed glypy/tests/
py.test -v glypy --lf

clean:
@rm glypy/*/*.pyd
@rm glypy/*/*.so
Expand All @@ -17,4 +18,4 @@ develop:
python setup.py develop

serve-docs:
python -m webbrowser -n docs\build\html\index.html
python -m webbrowser -n docs/build/html/index.html

0 comments on commit 07bc7d0

Please sign in to comment.