Skip to content

Commit

Permalink
[pep8] flake8 run for everything, fix items from this change
Browse files Browse the repository at this point in the history
Signed-off-by: akoskaaa <[email protected]>
  • Loading branch information
akoskaaa committed Mar 26, 2015
1 parent f9ea5ec commit fa2fb6b
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion script/test-versions
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e
script/validate-dco

>&2 echo "Running lint checks"
flake8 compose
flake8

if [ "$DOCKER_VERSIONS" == "" ]; then
DOCKER_VERSIONS="1.5.0"
Expand Down
4 changes: 2 additions & 2 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys

if sys.version_info >= (2, 7):
import unittest
import unittest # NOQA
else:
import unittest2 as unittest
import unittest2 as unittest # NOQA
5 changes: 2 additions & 3 deletions tests/integration/service_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def test_recreate_containers_when_containers_are_stopped(self):
entrypoint=['sleep'],
command=['300']
)
old_container = service.create_container()
service.create_container()
self.assertEqual(len(service.containers(stopped=True)), 1)
service.recreate_containers()
self.assertEqual(len(service.containers(stopped=True)), 1)
Expand Down Expand Up @@ -262,8 +262,7 @@ def test_start_container_with_external_links(self):
set([
'composetest_db_1',
'composetest_db_2',
'db_3',
]),
'db_3']),
)

def test_start_normal_container_does_not_create_links_to_its_own_service(self):
Expand Down
1 change: 0 additions & 1 deletion tests/unit/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import docker
import mock
from six import StringIO

from compose.cli import main
from compose.cli.main import TopLevelCommand
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ def test_circular(self):

def test_extends_validation(self):
dictionary = {'extends': None}
load_config = lambda: config.make_service_dict('myweb', dictionary, working_dir='tests/fixtures/extends')

def load_config():
return config.make_service_dict('myweb', dictionary, working_dir='tests/fixtures/extends')

self.assertRaisesRegexp(config.ConfigurationError, 'dictionary', load_config)

Expand Down
1 change: 0 additions & 1 deletion tests/unit/progress_stream_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from __future__ import absolute_import
from tests import unittest

import mock
from six import StringIO

from compose import progress_stream
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ deps =
-rrequirements-dev.txt
commands =
nosetests -v {posargs}
flake8 compose
flake8

[flake8]
# ignore line-length for now
Expand Down

0 comments on commit fa2fb6b

Please sign in to comment.