-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2dfa36e
commit 4ffc20b
Showing
5 changed files
with
39 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Math contract tests | ||
|
||
``` | ||
math | ||
├── conftest.py - "Fixtures for new and old math contracts." | ||
├── fuzz_multicoin_curve.py | ||
├── misc.py | ||
├── test_cbrt.py | ||
├── test_exp.py | ||
├── test_get_p.py | ||
├── test_get_y.py | ||
├── test_log2.py | ||
├── test_newton_D.py | ||
├── test_newton_D_ref.py | ||
├── test_newton_y.py | ||
└── test_packing.py - "Testing unpacking for (2, 3)-tuples" | ||
``` | ||
|
||
### Fuzzing parallelization | ||
Due to the nature of the math involved in curve pools (i.e. analytical solutions for equations not always availble), we often require on approximation methods to solve these equations numerically. Testing this requires extensive fuzzing which can be very time consuming sometimes. Hypothesis does not support test parallelisation and this is why in the code you might often see test parametrisation as a hacky way to obtain parallel fuzzing: | ||
|
||
```python | ||
@pytest.mark.parametrize( | ||
"_tmp", range(N_CASES) | ||
) # Parallelisation hack (more details in folder's README) | ||
``` |
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