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

Python 3.4 jobs with addon apt #225

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 37 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,50 @@
language: python
python:
- "2.7"
matrix:
include:
- python: "2.7"
virtualenv:
system_site_packages: true
addons:
apt:
packages:
- libusb-dev
- libusb-1.0-0-dev
- libudev-dev
- libffi-dev
- liblua5.2-dev
- libjpeg8-dev
- python-tk
- python-dbus
- pyqt4-dev-tools
- python: "3.4"
addons:
apt:
packages:
- libusb-dev
- libusb-1.0-0-dev
- libudev-dev
- libffi-dev
- liblua5.2-dev
- libjpeg8-dev
- python3-dbus
- python3-pyqt4

before_install:
- pip install -U setuptools
- sudo add-apt-repository -y ppa:pyside/ppa
- sudo apt-get update -qq
- sudo apt-get install -qq libusb-dev python-pyside libffi-dev libjpeg8-dev libudev-dev libusb-1.0-0-dev python-dbus liblua5.2-dev libusb-dev
- ln -s /usr/lib/python2.7/dist-packages/PySide /usr/lib/python2.7/dist-packages/*dbus* ~/virtualenv/python2.7/lib/python2.7/site-packages/
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.4" ]]; then
export PYTEST_QT_API=pyqt4 ;
ln -s /usr/lib/python3.2/dist-packages/*dbus* $VIRTUAL_ENV/lib/python$TRAVIS_PYTHON_VERSION/site-packages/ ;
fi
- pip install -U setuptools pytest
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3
install:
- pip install lupa --install-option='--no-luajit'
- pip install cffi flake8 pyflakes pep8-naming
- pip install cffi flake8 pep8-naming flake8-putty
- pip install -e ".[web,hidtrigger,autorotate,chdkcamera]"
- pip install -r test-requirements.txt
- pip install -e .
script:
- flake8 spreads spreadsplug tests --exclude=vendor
- py.test --cov spreads --cov spreadsplug -m "not guitest" tests
- if [[ $TRAVIS_PYTHON_VERSION != "3.4" ]]; then py.test --cov spreads --cov spreadsplug -m "not guitest" tests ; fi
after_success: coveralls
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
putty-ignore =
python_version > "3" , /(raw_input|unicode|basestring)/ : +F821
python_version > "3" , spreadsplug/ , tests/ : +F821
2 changes: 1 addition & 1 deletion spreadsplug/dev/dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ def update_configuration(self, updated):
pass

def show_textbox(self, msg):
print "DISPLAY ON {0} device:\n{1}".format(self.target_page, msg)
print("DISPLAY ON {0} device:\n{1}".format(self.target_page, msg))
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pytest-qt >= 1.0
pytest-cov >= 1.6
pytest >= 2.5.1
coveralls >= 0.2
sphinxcontrib-fulltoc==1.0
sphinxcontrib-fulltoc>=1.0
mock>=1.0.1
coverage>=3.6
psutil==2.0.0
2 changes: 1 addition & 1 deletion tests/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_configure(config, mock_input, mock_getch):

TestDriver.num_devices = 2

print config['plugins'].get()
print(config['plugins'].get())
assert config['driver'].get() == 'testdriver'
assert config['plugins'].get() == ["test_process", "test_output"]
assert config["device"]["focus_distance"].get() == 300
Expand Down