diff --git a/.travis.yml b/.travis.yml index d0b4eab..013015f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,17 +4,20 @@ python: before_install: - - "sudo apt-get update" - - "sudo apt-get install -qq cups cups-pdf" - - "curl http://www.cups.org/software/ipptool/ipptool-20130731-linux-ubuntu-x86_64.tar.gz | tar xvzf -" + - sudo apt-get update + - sudo apt-get install -qq cups cups-pdf + - curl http://www.cups.org/software/ipptool/ipptool-20130731-linux-ubuntu-x86_64.tar.gz | tar xvzf - - "echo \"[main]\nipptool_path = \"$TRAVIS_BUILD_DIR\"/ipptool-20130731/ipptool\ncups_uri = http://localhost:631/\" > ~/.pyipptool.cfg" - - "echo \"$USER:travis\" | sudo chpasswd" - - "sudo pip install -U pip setuptools" + - cat ~/.pyipptool.cfg + - echo "$USER:travis" | sudo chpasswd + - sudo pip install -U pip setuptools install: - - "pip install -e . pytest-cov coveralls pytest mock tornado pkipplib" + - pip install -e . pytest-cov coveralls pytest mock tornado pkipplib pep8 -script: "py.test --cov pyipptool --ignore ipptool-20130731" +script: + - py.test --cov pyipptool --ignore ipptool-20130731 + - pep8 pyipptool tests after_success: coveralls diff --git a/setup.py b/setup.py index 44a1747..39d4923 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ def read_that_file(path): packages=('pyipptool',), install_requires=('deform>=2.0a2',), extra_requires={'Tornado': ('tornado', 'futures')}, - tests_require=('mock', 'pytest', 'coverage', + tests_require=('mock', 'pytest', 'coverage', 'pep8', 'pytest-cov', 'coveralls', 'pkipplib', 'tornado'), include_package_data=True, test_suite='tests', diff --git a/tests/test_widget.py b/tests/test_widget.py index 9e27ee4..7097a0c 100644 --- a/tests/test_widget.py +++ b/tests/test_widget.py @@ -93,6 +93,7 @@ def test_ipp_file_widget(): response = widget.serialize(field, '/path/to/file.txt') assert response == 'FILE /path/to/file.txt' + def test_ipp_file_widget_with_None(): from pyipptool.widgets import IPPFileWidget