Skip to content

Commit

Permalink
reformating for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
carolemieux committed May 6, 2022
1 parent ab62db4 commit 070936d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions pynguin/analyses/seeding.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def get_ast_tree(module_path: AnyStr | os.PathLike[AnyStr]) -> ast.Module | None
for root, _, files in os.walk(module_path):
for name in files:
assert isinstance(name, str)
if module_name in name and "test_" in name and name.endswith('.py'):
if module_name in name and "test_" in name and name.endswith(".py"):
result.append(os.path.join(root, name))
break
try:
Expand Down Expand Up @@ -478,10 +478,15 @@ def _remove_no_coverage_testcases(self):
num_removed_test_cases += 1
logger.debug(
"Test case:\n %s\n has coverage %s vs. import coverage %f",
exporter.export_sequences_to_str([testcase]), # type: ignore
coverage, import_coverage
exporter.export_sequences_to_str([testcase]),
coverage,
import_coverage,
)
self._testcases = [tc for idx, tc in enumerate(self._testcases) if idx not in idxs_to_remove]
self._testcases = [
tc
for idx, tc in enumerate(self._testcases)
if idx not in idxs_to_remove
]
logger.info(
"Number test cases removed because they have no coverage: %s",
num_removed_test_cases,
Expand Down
4 changes: 2 additions & 2 deletions pynguin/analyses/statement_deserializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def create_stmt_from_call(
The corresponding statement.
"""
if config.configuration.seeding.allow_expandable_cluster:
logger.info("Trying to find an expandable cluster")
logger.info("Trying to find in expandable cluster")
gen_callable = self._test_cluster.try_resolve_call( # type: ignore
ast.unparse(call.func)
)
Expand Down Expand Up @@ -432,7 +432,7 @@ def assemble_stmt_from_gen_callable(
)
if isinstance(gen_callable, GenericMethod):
try:
self._ref_dict[call.func.value.id]
self._ref_dict[call.func.value.id] # type: ignore
except (KeyError, AttributeError):
return None
return stmt.MethodStatement(
Expand Down

0 comments on commit 070936d

Please sign in to comment.