Skip to content

Commit

Permalink
Fix running tests in tox. Closes #61.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Jun 5, 2015
1 parent 5e57566 commit e374c44
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.pyc
__pycache__
cairocffi/_ffi*.py
*.egg
*.egg-info
/dist
/.tox
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ before_install:
install:
- "pip install xcffib"
- "pip install ."
- "python -c 'import cffi, sys; sys.exit(cffi.__version_info__[0])' || python cairocffi/ffi_build.py"
script: "py.test"
sudo: false
12 changes: 7 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,22 @@ envlist = py26-cairo-1.8.2, py26-cairo-1.10.0, py26, py27, py32, py33, py34, pyp
deps=
pytest
xcffib
commands=py.test []
commands=py.test --pyargs cairocffi []
changedir={toxworkdir}
passenv=DISPLAY

[testenv:py26-cairo-1.8.2]
; Building old cairo on an modern system might require setting
; "png_REQUIRES=libpng" as an environment variable for ./configure
basepython=python2.6
setenv=LD_LIBRARY_PATH=../cairo-1.8.2/lib
setenv=LD_LIBRARY_PATH={toxinidir}/../cairo-1.8.2/lib
commands=
py.test []
py.test --pyargs cairocffi []
python -c 'import cairocffi; version = cairocffi.cairo_version_string(); print "Cairo version", version; assert version == "1.8.2"'

[testenv:py26-cairo-1.10.0]
basepython=python2.6
setenv=LD_LIBRARY_PATH=../cairo-1.10.0/lib
setenv=LD_LIBRARY_PATH={toxinidir}/../cairo-1.10.0/lib
commands=
py.test []
py.test --pyargs cairocffi []
python -c 'import cairocffi; version = cairocffi.cairo_version_string(); print "Cairo version", version; assert version == "1.10.0"'

0 comments on commit e374c44

Please sign in to comment.