diff --git a/.coverage b/.coverage new file mode 100644 index 0000000..e69de29 diff --git a/.travis.yml b/.travis.yml index a1191c7..c5c687b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,4 +4,5 @@ python: # command to install dependencies install: "pip install -r requirements.txt" # command to run tests -script: python tests_basic.py -v +script: py.test --cov=instax tests_basic.py --doctest-modules --pep8 instax +after_success: coveralls diff --git a/instax/statusCodes.py b/instax/statusCodes.py index 4449e55..77c7415 100644 --- a/instax/statusCodes.py +++ b/instax/statusCodes.py @@ -11,18 +11,16 @@ class ResponseCode: """ The Current Response Code """ - RET_HOLD, ST_UPDATE, E_OTHER_USED, E_NOT_IMAGE_DATA, - E_BATTERY_EMPTY, E_PRINTING, E_EJECTING, E_TESTING, - E_CHARGE, E_CONNECT, E_RCV_FRAME, E_FILM_EMPTY, - E_CAM_POINT, E_MOTOR, E_UNMATCH_PASS, E_PI_SENSOR, - E_RCV_FRAME = range(17) + (RET_HOLD, ST_UPDATE, E_OTHER_USED, E_NOT_IMAGE_DATA, + E_BATTERY_EMPTY, E_PRINTING, E_EJECTING, E_TESTING, + E_CHARGE, E_CONNECT, E_RCV_FRAME, E_FILM_EMPTY, + E_CAM_POINT, E_MOTOR, E_UNMATCH_PASS, E_PI_SENSOR, + E_RCV_FRAME) = range(17) def __init__(self, status): self.status = status - - """ errorCodes = { 127: 'ST_UPDATE & RET_HOLD', diff --git a/requirements.txt b/requirements.txt index bec6bf5..f9bfdf3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,8 @@ Pillow==4.0.0 olefile==0.44 +pycodestyle==2.3.1 +pytest==3.2.1 +pytest-cache==1.0 +pytest-cov==2.5.1 +pytest-pep8==1.0.6 +python-coveralls==2.9.1