Skip to content

Commit

Permalink
Merge pull request #1157 from CityOfZion/CU-86a1hupth
Browse files Browse the repository at this point in the history
Refactor test_for.py to use BoaTestConstructor
  • Loading branch information
meevee98 committed Jan 4, 2024
2 parents 73b8da2 + 0bd4b85 commit d4c2b92
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 259 deletions.
2 changes: 1 addition & 1 deletion boa3_test/test_sc/for_test/ForWithContractInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def main(number: int) -> List[int]:
return result_list


@contract('0x4080550f521e0ce4a650b3d4c6df22be960335fd')
@contract('0x48f74c68e8b538e62383085122367a030fe6441e')
class AnotherContract:

@staticmethod
Expand Down
4 changes: 4 additions & 0 deletions boa3_test/tests/boatestcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ def assertCompilerNotLogs(self,
raise AssertionError(f'{expected_logged_exception.__name__} was logged: "{expected_logged[0].message}"')
return output

def assertStartsWith(self, first: Any, second: Any):
if not (hasattr(first, 'startswith') and first.startswith(second)):
self.fail(f'{first} != {second}')

def _assert_compiler_logs_error(self,
expected_logged_exception,
path
Expand Down

0 comments on commit d4c2b92

Please sign in to comment.