Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis ci #2

Merged
merged 14 commits into from Nov 22, 2017
23 changes: 23 additions & 0 deletions .travis.yml
@@ -0,0 +1,23 @@
language: python

sudo: false

python:
- "2.7"
- "3.6"
- "nightly"
- "pypy"

install:
- pip install --upgrade --requirement requirements-test.txt
- pip install --editable .

script:
- pytest --cov=wimpy

after_success:
- coverage combine
- coveralls

notifications:
email: false
3 changes: 3 additions & 0 deletions README.rst
@@ -1 +1,4 @@
.. image:: https://coveralls.io/repos/github/wimglenn/wimpy/badge.svg?branch=master
:target: https://coveralls.io/github/wimglenn/wimpy?branch=master

Some commonly used helpers that I should stop copy-pasting all over the place
3 changes: 3 additions & 0 deletions requirements-test.txt
@@ -0,0 +1,3 @@
coveralls
pytest
pytest-cov
6 changes: 5 additions & 1 deletion setup.cfg
@@ -1,5 +1,9 @@
[bdist_wheel]
python-tag = py36
universal = 1

[metadata]
license_file=LICENSE

[coverage:run]
branch = True
parallel = True
1 change: 0 additions & 1 deletion setup.py
Expand Up @@ -9,5 +9,4 @@
author_email='hey@wimglenn.com',
license='MIT',
packages=find_packages(exclude=['tests']),
python_requires=f'>=3.6',
)
2 changes: 2 additions & 0 deletions tests/test_util.py
Expand Up @@ -52,3 +52,5 @@ def test_cached_property():
del a.prop # this deletes from instance dict
with pytest.raises(AttributeError):
del a.prop # .. but you can't delete the descriptor
assert isinstance(a.prop, float)
assert isinstance(A.prop, cached_property)
2 changes: 1 addition & 1 deletion wimpy/util.py
Expand Up @@ -26,7 +26,7 @@ def __get__(self, obj, cls):
def working_directory(path):
"""Change working directory and restore the previous on exit"""
prev_dir = os.getcwd()
os.chdir(path)
os.chdir(str(path))
try:
yield
finally:
Expand Down