Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Innixma committed Dec 19, 2024
1 parent ed1f2d1 commit 99b4789
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,10 @@ def load_model_failures(self) -> List[pd.DataFrame]:

def load_info_file_sizes(self, sum: bool = False) -> List[pd.DataFrame]:
return self._loop_func(
func=OutputContext.get_info_file_sizes, input_list=self.output_contexts, kwargs={"sum": sum}, allow_exception=True
func=OutputContext.get_info_file_sizes,
input_list=self.output_contexts,
kwargs={"sum": sum},
allow_exception=True,
)

def aggregate_info_file_sizes(self, sum: bool = False) -> pd.DataFrame:
Expand Down
26 changes: 16 additions & 10 deletions tests/unittests/cloud/aws/test_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ def test_static_resource_stack_without_vpc():
for key, value in context_values.items():
app.node.set_context(key, value)

with patch.object(
StaticResourceStack,
"create_s3_resources",
return_value=s3.Bucket(Stack(app, "TestBucketStack"), "DummyBucket"),
) as mock_s3_resources, patch.dict(os.environ, {"CDK_DEPLOY_REGION": "dummy_region"}):
with (
patch.object(
StaticResourceStack,
"create_s3_resources",
return_value=s3.Bucket(Stack(app, "TestBucketStack"), "DummyBucket"),
) as mock_s3_resources,
patch.dict(os.environ, {"CDK_DEPLOY_REGION": "dummy_region"}),
):
stack = StaticResourceStack(app, "TestStaticResourceStack", env=env)

mock_s3_resources.assert_called_once()
Expand All @@ -37,11 +40,14 @@ def test_static_resource_stack_with_vpc():
app.node.set_context(key, value)
app.node.set_context("VPC_NAME", "ProvidedVpcName")

with patch.object(
StaticResourceStack,
"create_s3_resources",
return_value=s3.Bucket(Stack(app, "TestBucketStack"), "DummyBucket"),
) as mock_s3_resources, patch.dict(os.environ, {"CDK_DEPLOY_REGION": "dummy_region"}):
with (
patch.object(
StaticResourceStack,
"create_s3_resources",
return_value=s3.Bucket(Stack(app, "TestBucketStack"), "DummyBucket"),
) as mock_s3_resources,
patch.dict(os.environ, {"CDK_DEPLOY_REGION": "dummy_region"}),
):
stack = StaticResourceStack(app, "TestStaticResourceStack", env=env)

mock_s3_resources.assert_called_once()
Expand Down

0 comments on commit 99b4789

Please sign in to comment.