Skip to content

Commit

Permalink
Fix flake8 linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelAquilina committed Aug 10, 2017
1 parent a4e53b8 commit a563e7f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from distutils.core import setup

try:
from setuptools import setup, find_packages
from setuptools import setup, find_packages # noqa
except ImportError:
from distutils.core import setup

Expand Down
3 changes: 1 addition & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def test_correct_output(self, config_file):

assert cli.get_config() == {'local_folder': '/home/someone/something'}


@mock.patch('s4.sync.SyncWorker')
class TestSyncCommand(object):
def test_no_targets(self, SyncWorker, logger):
Expand Down Expand Up @@ -274,7 +275,6 @@ def test_no_changes(self, get_input, logger, config_file):
}
assert expected_config == config


def test_correct_output(self, get_input, logger, config_file):
fake_stream = FakeInputStream([
'/home/user/Documents',
Expand Down Expand Up @@ -523,7 +523,6 @@ def test_show_all(self, s3_client, local_client, logger):
assert get_stream_value(logger) == expected_result



class TestTargetsCommand(object):

def test_empty(self, logger):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ def test_diff(self, call, local_client, s3_client):
assert call.call_args_list[0][0][0][0] == "diff"
assert call.call_args_list[1][0][0][0] == "less"


class TestSyncWorker(object):
def test_get_deferred_function_unknown(self, local_client, s3_client):
worker = sync.SyncWorker(local_client, s3_client)
Expand Down Expand Up @@ -502,7 +503,7 @@ def keyboard_interrupt():
'foo': sync.DeferredFunction(worker.delete_client, local_client, 'foo', 1000),
'bar': sync.DeferredFunction(failing_function),
'yap': sync.DeferredFunction(keyboard_interrupt),
'baz': sync.DeferredFunction(worker.create_client, local_client, s3_client, 'baz', 2000),
'baz': sync.DeferredFunction(worker.create_client, local_client, s3_client, 'baz', 20),
})
assert sorted(success) == sorted(['foo', 'baz'])
assert_local_keys(clients, ['baz'])
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from s4 import utils


@mock.patch('getpass.getpass')
@mock.patch('builtins.input')
def test_get_input(getpass, input_fn):
Expand All @@ -20,4 +21,3 @@ def test_get_input_secret(getpass, input_fn):

assert getpass.call_count == 0
assert input_fn.call_count == 1

2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ envlist = py33, py34, py35, py36, py37, flake8
[testenv:flake8]
basepython=python
deps=flake8
commands=flake8 s4
commands=flake8 s4 tests

[testenv]
passenv = CI TRAVIS TRAVIS_*
Expand Down

0 comments on commit a563e7f

Please sign in to comment.