Skip to content

Commit

Permalink
Merge pull request #38 from mattsb42-aws/dev-37
Browse files Browse the repository at this point in the history
updating examples tests to properly separate import sections
  • Loading branch information
mattsb42-aws authored Dec 19, 2017
2 parents c767187 + 122a0a6 commit 04ae2a4
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 28 deletions.
5 changes: 3 additions & 2 deletions examples/test/test_i_basic_encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
os.sep.join([os.path.dirname(__file__), '..', 'src'])
])

from basic_encryption import cycle_string
import botocore.session
from integration_test_utils import get_cmk_arn, SKIP_MESSAGE, skip_tests
import pytest

from basic_encryption import cycle_string
from integration_test_utils import get_cmk_arn, SKIP_MESSAGE, skip_tests


@pytest.mark.skipif(skip_tests(), reason=SKIP_MESSAGE)
def test_cycle_string():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
])
import tempfile

from basic_file_encryption_with_multiple_providers import cycle_file
import botocore.session
from integration_test_utils import get_cmk_arn, SKIP_MESSAGE, skip_tests
import pytest

from basic_file_encryption_with_multiple_providers import cycle_file
from integration_test_utils import get_cmk_arn, SKIP_MESSAGE, skip_tests


@pytest.mark.skipif(skip_tests(), reason=SKIP_MESSAGE)
def test_cycle_file():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
])
import tempfile

import pytest

from basic_file_encryption_with_raw_key_provider import cycle_file
from integration_test_utils import SKIP_MESSAGE, skip_tests
import pytest


@pytest.mark.skipif(skip_tests(), reason=SKIP_MESSAGE)
Expand Down
3 changes: 2 additions & 1 deletion examples/test/test_i_data_key_caching_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
os.sep.join([os.path.dirname(__file__), '..', 'src'])
])

import pytest

from data_key_caching_basic import encrypt_with_caching
from integration_test_utils import get_cmk_arn, SKIP_MESSAGE, skip_tests
import pytest


@pytest.mark.skipif(skip_tests(), reason=SKIP_MESSAGE)
Expand Down
19 changes: 19 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,22 @@ branch = True

[coverage:report]
show_missing = True

# Flake8 Configuration
[flake8]
max_complexity = 10
max_line_length = 120
import_order_style = google
application_import_names = aws_encryption_sdk
builtins = raw_input
ignore =
# Ignoring D205 and D400 because of false positives
D205, D400,
# Ignoring D401 pending discussion of imperative mood
D401,
# Ignoring W503 : line break before binary operator
W503

# Doc8 Configuration
[doc8]
max-line-length = 120
File renamed without changes.
31 changes: 9 additions & 22 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,14 @@ commands =
--application-import-names= \
examples/src/
flake8 \
# Examples should not treat any imports a application-local.
--application-import-names= \
# Examples tests must treat the example and helper modules as application-local.
--application-import-names="\
integration_test_utils,\
basic_encryption,\
basic_file_encryption_with_multiple_providers,\
basic_file_encryption_with_raw_key_provider,\
data_key_caching_basic,\
" \
# Ingore D103 missing docstring errors in tests (test names should be self-documenting)
--ignore D103 \
examples/test/
Expand All @@ -96,7 +102,7 @@ deps =
pylint
commands =
pylint \
--rcfile=pylintrc \
--rcfile=src/pylintrc \
src/aws_encryption_sdk/ \
setup.py

Expand Down Expand Up @@ -219,22 +225,3 @@ deps =
commands =
{[testenv:build]commands}
twine upload --skip-existing --repository pypi dist/*

# Flake8 Configuration
[flake8]
max_complexity = 10
max_line_length = 120
import_order_style = google
application_import_names = aws_encryption_sdk
builtins = raw_input
ignore =
# Ignoring D205 and D400 because of false positives
D205, D400,
# Ignoring D401 pending discussion of imperative mood
D401,
# Ignoring W503 : line break before binary operator
W503

# Doc8 Configuration
[doc8]
max-line-length = 120

0 comments on commit 04ae2a4

Please sign in to comment.