Skip to content

Commit 02ded14

Browse files
committed
Fixed tests. Setup sdist. Deprecated py3.4
1 parent ac966d9 commit 02ded14

6 files changed

Lines changed: 16 additions & 17 deletions

File tree

requirements_test.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
wheel==0.29.0
2-
tox==2.8.1
3-
flake8==3.4.1
2+
tox==3.14.0
3+
flake8>=3.6.0
44
flake8-docstrings==1.1.0
5-
pylint==1.8.2
5+
pylint==2.4.4
66
pydocstyle==2.0.0
77
pytest>=2.9.2
88
pytest-cov>=2.3.1
99
pytest-sugar>=0.8.0
1010
pytest-timeout>=1.0.0
1111
restructuredtext-lint>=1.0.1
1212
pygments>=2.2.0
13-
requests_mock>=1.3.0
13+
requests_mock>=1.3.0

skybellpy/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
import argparse
1616

17+
from colorlog import ColoredFormatter
18+
1719
import skybellpy
1820
import skybellpy.helpers.constants as CONST
1921
from skybellpy.exceptions import SkybellException
@@ -35,7 +37,6 @@ def setup_logging(log_level=logging.INFO):
3537
logging.getLogger('aiohttp.access').setLevel(logging.WARNING)
3638

3739
try:
38-
from colorlog import ColoredFormatter
3940
logging.getLogger().handlers[0].setFormatter(ColoredFormatter(
4041
colorfmt,
4142
datefmt=datefmt,

skybellpy/device.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
_LOGGER = logging.getLogger(__name__)
1313

1414

15-
class SkybellDevice(object):
15+
class SkybellDevice():
1616
"""Class to represent each Skybell device."""
1717

1818
def __init__(self, device_json, skybell):
@@ -121,8 +121,8 @@ def _update_events(self):
121121

122122
if old_event and created_at < old_event.get(CONST.CREATED_AT):
123123
continue
124-
else:
125-
events[event] = activity
124+
125+
events[event] = activity
126126

127127
self._skybell.update_dev_cache(
128128
self,

skybellpy/exceptions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,3 @@ def __init__(self, error, details=None):
1717

1818
class SkybellAuthenticationException(SkybellException):
1919
"""Class to throw authentication exception."""
20-
21-
pass

skybellpy/helpers/constants.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
import os
33

44
MAJOR_VERSION = 0
5-
MINOR_VERSION = 4
5+
MINOR_VERSION = 5
66
PATCH_VERSION = '0'
77

88
__version__ = '{}.{}.{}'.format(MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION)
99

10-
REQUIRED_PYTHON_VER = (3, 4, 2)
10+
REQUIRED_PYTHON_VER = (3, 5, 0)
1111

1212
PROJECT_NAME = 'skybellpy'
1313
PROJECT_PACKAGE_NAME = 'skybellpy'
@@ -29,7 +29,7 @@
2929
'Intended Audience :: Developers',
3030
'License :: OSI Approved :: MIT License',
3131
'Operating System :: OS Independent',
32-
'Programming Language :: Python :: 3.4',
32+
'Programming Language :: Python :: 3.5',
3333
'Topic :: Home Automation'
3434
]
3535

tox.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = build, py34, py35, py36, lint
2+
envlist = build, py35, py36, py37, lint
33
skip_missing_interpreters = True
44
skipsdist = True
55

@@ -8,7 +8,7 @@ setenv =
88
LANG=en_US.UTF-8
99
PYTHONPATH = {toxinidir}/skybellpy
1010
commands =
11-
py.test --timeout=30 --duration=10 --cov=skybellpy --cov-report term-missing {posargs}
11+
py.test --timeout=30 --cov=skybellpy --cov-report term-missing {posargs}
1212
deps =
1313
-r{toxinidir}/requirements.txt
1414
-r{toxinidir}/requirements_test.txt
@@ -36,5 +36,5 @@ deps =
3636
-r{toxinidir}/requirements.txt
3737
commands =
3838
/bin/rm -rf build dist
39-
python setup.py bdist_wheel
40-
/bin/sh -c "pip install --upgrade dist/*.whl"
39+
python setup.py sdist bdist_wheel
40+
/bin/sh -c "pip install --upgrade dist/*.whl"

0 commit comments

Comments
 (0)