Skip to content

Commit

Permalink
mocks: add support for entering the global scope
Browse files Browse the repository at this point in the history
  • Loading branch information
jpochyla committed Oct 10, 2018
1 parent f75c190 commit bd24bb3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion embed/extmod/modtrezorcrypto/modtrezorcrypto-monero.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_trezorcrypto_monero_hasher___del___obj, mod
// Scalar defs
//

/// # mock:global
/// mock:global

/// def init256_modm(dst: Optional[Sc25519], val: Union[int, bytes, Sc25519]) -> Sc25519:
/// '''
/// Initializes Sc25519 scalar
Expand Down
5 changes: 5 additions & 0 deletions tools/build_mocks
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ def split_to_parts(line, mod_desc=None):
current_package = line[9:].strip()
return

if line.startswith("mock:global"):
current_indent = 0
current_class = None
return

if line.startswith("class "):
current_class = line[6:].split("(")[0].strip(":")
current_indent = 0
Expand Down

0 comments on commit bd24bb3

Please sign in to comment.