Skip to content

Commit

Permalink
chore: black format tests (#1415)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanathkr authored Sep 16, 2019
1 parent feeb1a2 commit f896920
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/integration/buildcmd/build_integ_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def setUp(self):
# location that is shared in Docker. Most temp directories are not shared. Therefore we are
# using a scratch space within the test folder that is .gitignored. Contents of this folder
# is also deleted after every test run
self.scratch_dir = str(Path(__file__).resolve().parent.joinpath(str(uuid.uuid4()).replace('-', '')[:10]))
self.scratch_dir = str(Path(__file__).resolve().parent.joinpath(str(uuid.uuid4()).replace("-", "")[:10]))
shutil.rmtree(self.scratch_dir, ignore_errors=True)
os.mkdir(self.scratch_dir)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/deprecation/test_deprecation_warning.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_print_deprecation_warning_if_py2(self):
process = self.run_cmd()
(stdoutdata, stderrdata) = process.communicate()

expected_notice = re.sub(r'\n', os.linesep, DEPRECATION_NOTICE)
expected_notice = re.sub(r"\n", os.linesep, DEPRECATION_NOTICE)
# Deprecation notice should be part of the command output if running in python 2
if sys.version_info.major == 2:
self.assertIn(expected_notice, stderrdata.decode())
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ def start_lambda(cls):
if os.getenv("SAM_CLI_DEV"):
command = "samdev"

cls.start_lambda_process = Popen(
[command, "local", "start-lambda", "-t", cls.template, "-p", cls.port]
)
cls.start_lambda_process = Popen([command, "local", "start-lambda", "-t", cls.template, "-p", cls.port])

# we need to wait some time for start-lambda to start, hence the sleep
time.sleep(5)
Expand Down
1 change: 1 addition & 0 deletions tests/integration/local/start_lambda/test_start_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def test_same_endpoint(self):
for result in results:
self.assertEqual(result.get("Payload").read().decode("utf-8"), '"Slept for 10s"')


class TestLambdaServiceErrorCases(StartLambdaIntegBaseClass):
template_path = "/testdata/invoke/template.yml"

Expand Down

0 comments on commit f896920

Please sign in to comment.