Asset range option
All threads resolved!
All threads resolved!
While writing tests, I encountered a problem with the number of vests changing over time. I've created a function that works similarly to python's built-in range()
function. It works like this:
tt.Asset.Range(tt.Asset.Test(1), tt.Asset.Test(2))
use analogous to:
range(1, 2)
This allowed me to achieve my goal:
assert tt.Asset.Test(2) in tt.Asset.Range(tt.Asset.Test(1), tt.Asset.Test(3))
I also added the option of specifying the upper deviation percentage:
tt.Asset.Range(tt.Asset.Test(1), percentage_range=10)
the above case should be understood as follows: from tt.Asset.Test(1) to tt.Asset.Test(1) + 10%
Merge request reports
Activity
- Resolved by Mateusz Żebrak
- Resolved by Mateusz Żebrak
- Resolved by Mateusz Żebrak
- Resolved by Mateusz Żebrak
- Resolved by Mateusz Żebrak
Take a look at the `mzebrak/kudmich/add_asset_range_option' branch - it's not finished yet, but here you can get suggestions on how to refactor the assertions. There is still some redundancy you need to resolve if you want to apply.
added 5 commits
- 155c71df - Create helper-class to class Asset (determining the range of the asset)
- 8ba2c947 - Secure creation of `Range` object with negative `tolerance` parameter
- 3af6e469 - Add tests to check the "Range" option associated with Assets
- 447f5213 - Describe the class `Range`
- 6e992eb6 - Create an AssetLimitT - type
Toggle commit list- Resolved by Mateusz Żebrak
added 1 commit
- d41c5ea6 - fixup! Add tests to check the "Range" option associated with Assets
- Resolved by Mateusz Żebrak
- Resolved by Mateusz Żebrak
added 1 commit
- 38ecfe30 - fixup! Add tests to check the "Range" option associated with Assets
mentioned in merge request hive!911 (merged)
Please register or sign in to reply