Skip to content

Commit

Permalink
run tests with pytest
Browse files Browse the repository at this point in the history
all tests pass without modification, as long as nose is present,
since we still use nose.tools in a few places.

We can remove the nose dependency in a later patch
  • Loading branch information
minrk committed Jul 29, 2016
1 parent e0cbeb2 commit 80b977d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Expand Up @@ -20,9 +20,8 @@ install:
- pip install nbconvert[execute,serve,test]
- python -m ipykernel.kernelspec --user
script:
- # need to cd or coverage report broken.
- cd /tmp/
- nosetests nbconvert --with-coverage --cover-package nbconvert --cover-inclusive --cover-xml --cover-xml-file=$TRAVIS_BUILD_DIR/coverage.xml
- cd -
# cd so we test the install, not the repo
- cd `mktemp -d`
- py.test --cov nbconvert -v --pyargs nbconvert
after_success:
- codecov
7 changes: 7 additions & 0 deletions README.md
Expand Up @@ -59,6 +59,13 @@ cd nbconvert
pip install -e .
```

Running the tests after a dev install above:

```
pip install nbconvert[test]
py.test --pyargs nbconvert
```


## Resources

Expand Down
4 changes: 3 additions & 1 deletion setup.py
Expand Up @@ -183,7 +183,9 @@ def run(self):
]

extras_require = setuptools_args['extras_require'] = {
'test': ['nose', 'ipykernel', 'testpath'],
# FIXME: tests still require nose for some utility calls,
# but we are running with pytest
'test': ['pytest', 'pytest-cov', 'nose', 'ipykernel', 'testpath'],
'serve': ['tornado'],
'execute': ['jupyter_client'],
}
Expand Down

0 comments on commit 80b977d

Please sign in to comment.