Skip to content

Commit

Permalink
CU-86a1hupth - Refactor test_for.py to use BoaTestConstructor
Browse files Browse the repository at this point in the history
  • Loading branch information
luc10921 committed Jan 2, 2024
1 parent 307a361 commit 3ea7bb6
Show file tree
Hide file tree
Showing 3 changed files with 83 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 3ea7bb6

Please sign in to comment.