Skip to content

Commit

Permalink
sorted out flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
OmegaDroid committed Aug 10, 2016
1 parent a75c494 commit 37ab2a0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
3 changes: 0 additions & 3 deletions demo/selenium_tests/test_rate.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
from __future__ import division

from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.test import override_settings
from mock import patch
from django.contrib.auth import get_user_model
from hypothesis import given, settings
from hypothesis.extra.django import TestCase
from hypothesis.strategies import integers, lists
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException, TimeoutException, WebDriverException
from selenium.webdriver.support.wait import WebDriverWait
from .testcase import SeleniumTestCase
Expand Down
2 changes: 1 addition & 1 deletion demo/selenium_tests/testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
'deviceName': 'Android Emulator',
'version': '4.2',
},
'android_4.1':{
'android_4.1': {
'platform': 'Linux',
'browserName': 'android',
'deviceName': 'Android Emulator',
Expand Down
8 changes: 3 additions & 5 deletions scripts/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
'fast': ['tests', '--tb=short', '-q'],
}

FLAKE8_ARGS = ['star_ratings', 'tests', '--ignore=E501']


sys.path.append(os.path.dirname(__file__))

Expand All @@ -25,9 +23,9 @@ def exit_on_failure(ret, message=None):
sys.exit(ret)


def flake8_main(args):
def flake8_main():
print('Running flake8 code linting')
ret = subprocess.call(['flake8'] + args)
ret = subprocess.call(['flake8'])
print('flake8 failed' if ret else 'flake8 passed')
return ret

Expand Down Expand Up @@ -93,4 +91,4 @@ def is_class(string):
if run_tests:
exit_on_failure(pytest.main(pytest_args))
if run_flake8:
exit_on_failure(flake8_main(FLAKE8_ARGS))
exit_on_failure(flake8_main())
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ description-file = README.rst

[pytest]
exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,.ropeproject

[flake8]
exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,.ropeproject,.hypothesis,node_modules,wsgi.py
ignore = E501
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))


def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
Expand Down

0 comments on commit 37ab2a0

Please sign in to comment.