-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: mocks, conftest, twa tests (#9)
* merge-needed commits * exports * test: testsuite improvement, conftest & mocks, twa tests * fix merging issues (double comment) * addressing reviews * chore: reuse interface from module --------- Co-authored-by: Alberto <albicento.ac@gmail.com>
- Loading branch information
1 parent
0db7e2c
commit cc8072e
Showing
15 changed files
with
285 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import sys | ||
|
||
import pytest | ||
|
||
|
||
def is_debug_mode(): | ||
return sys.gettrace() is not None | ||
|
||
|
||
def main(): | ||
# Pytest arguments | ||
pytest_args = [ | ||
"-s", # Do not capture output, allowing you to see print statements and debug info | ||
"tests/unitary/twa", # Specific test to run | ||
# '--maxfail=1', # Stop after the firstD failure | ||
"--tb=short", # Shorter traceback for easier reading | ||
"-rA", # Show extra test summary info | ||
] | ||
|
||
if not is_debug_mode(): | ||
pass | ||
pytest_args.append("-n=auto") # Automatically determine the number of workers | ||
|
||
# Run pytest with the specified arguments | ||
pytest.main(pytest_args) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# pragma version ~=0.4 | ||
|
||
debt: public(uint256) | ||
|
||
|
||
@deploy | ||
def __init__(circulating_supply: uint256): | ||
self.debt = circulating_supply |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.