Fix tests for python2.7

pull/9/head
Raphaël Vinot 2016-01-29 10:51:43 +01:00
parent cec9ea0f73
commit 2dd0520964
3 changed files with 7 additions and 6 deletions

View File

@ -27,7 +27,6 @@ install:
- sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty multiverse" && sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty-updates multiverse"
- sudo apt-get update -qq
- sudo apt-get install -y p7zip-rar
- pip install git+https://github.com/ahupp/python-magic.git
# generic.py: pdf2htmlEX + dependencies
- sudo add-apt-repository ppa:fontforge/fontforge --yes
# to get a working 0.26 poppler
@ -44,8 +43,7 @@ install:
- sudo apt-get install -y libreoffice
- sudo apt-get install -y unoconv
# filecheck.py dependencies
- pip install lxml
- pip install officedissector
- pip install officedissector lxml exifread pillow
- if [ $(python -c 'import sys; print(sys.version_info.major)') == '2' ]; then pip install oletools olefile ; fi
- wget https://didierstevens.com/files/software/pdfid_v0_2_1.zip
- unzip pdfid_v0_2_1.zip

View File

@ -12,8 +12,8 @@ setup(
description='Standalone CIRCLean/KittenGroomer code.',
packages=['kittengroomer'],
scripts=['bin/generic.py', 'bin/pier9.py', 'bin/specific.py', 'bin/filecheck.py'],
include_package_data = True,
package_data = {'data': ['PDFA_def.ps','srgb.icc']},
include_package_data=True,
package_data={'data': ['PDFA_def.ps', 'srgb.icc']},
test_suite="tests",
classifiers=[
'License :: OSI Approved :: BSD License',
@ -25,5 +25,5 @@ setup(
'Topic :: Communications :: File Sharing',
'Topic :: Security',
],
install_requires=['twiggy'],
install_requires=['twiggy', 'python-magic'],
)

3
tests/test.py Normal file → Executable file
View File

@ -5,6 +5,9 @@ import unittest
import os
import sys
if __name__ == '__main__':
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir))
from bin.specific import KittenGroomerSpec
from bin.pier9 import KittenGroomerPier9
from bin.generic import KittenGroomer