Change to Python 3 compatible only

pull/8/head
Dan Puttick 2017-01-19 17:06:34 -05:00
parent fd30fb3e08
commit 833ade6008
5 changed files with 7 additions and 19 deletions

View File

@ -1,7 +1,6 @@
language: python
python:
- 2.7
- 3.3
- 3.4
- 3.5
@ -73,7 +72,7 @@ install:
- popd
script:
- travis_wait 60 py.test --cov=kittengroomer --cov=bin tests/
- travis_wait 30 py.test --cov=kittengroomer --cov=bin tests/
notifications:
email:

View File

@ -7,7 +7,7 @@
PyCIRCLean is the core Python code used by [CIRCLean](https://github.com/CIRCL/Circlean/), an open-source
USB key and document sanitizer created by [CIRCL](https://www.circl.lu/). This module has been separated from the
device-specific scripts and can be used for dedicated security applications to sanitize documents from hostile environments
to trusted environments.
to trusted environments. PyCIRCLean is currently Python 3.3+ only.
# Installation

View File

@ -19,7 +19,6 @@ setup(
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Science/Research',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Communications :: File Sharing',
'Topic :: Security',

View File

@ -2,14 +2,12 @@
# -*- coding: utf-8 -*-
import os
import sys
import pytest
from kittengroomer import FileBase, KittenGroomerBase
from kittengroomer.helpers import ImplementationRequired
PY3 = sys.version_info.major == 3
skip = pytest.mark.skip
xfail = pytest.mark.xfail
fixture = pytest.fixture
@ -89,18 +87,10 @@ class TestFileBase:
def test_create_broken(self, tmpdir):
with pytest.raises(TypeError):
file_no_args = FileBase()
if PY3:
with pytest.raises(FileNotFoundError):
file_empty_args = FileBase('', '')
else:
with pytest.raises(IOError):
file_empty_args = FileBase('', '')
if PY3:
with pytest.raises(IsADirectoryError):
file_directory = FileBase(tmpdir.strpath, tmpdir.strpath)
else:
with pytest.raises(IOError):
file_directory = FileBase(tmpdir.strpath, tmpdir.strpath)
with pytest.raises(FileNotFoundError):
file_empty_args = FileBase('', '')
with pytest.raises(IsADirectoryError):
file_directory = FileBase(tmpdir.strpath, tmpdir.strpath)
# are there other cases here? path to a file that doesn't exist? permissions?
def test_init(self, generic_conf_file):

View File

@ -1,5 +1,5 @@
[tox]
envlist=py27,py35
envlist=py35
[testenv]
deps=-rdev-requirements.txt
commands= pytest --cov=kittengroomer --cov=bin