Skip to content
Snippets Groups Projects

Asset range option

Merged Michał Kudela requested to merge kudmich/add_asset_range_option into master
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%

@mzebrak, @kmochocki

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • 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.

  • Michał Kudela added 3 commits

    added 3 commits

    • dd883fb8 - Create helper-class to class Asset (determining the range of the asset)
    • 82ae1d20 - Secure creation of `Range` object with negative `tolerance` parameter
    • f986fc88 - Add tests to check the "Range" option associated with Assets

    Compare with previous version

  • Michał Kudela added 1 commit

    added 1 commit

    Compare with previous version

  • Michał Kudela added 1 commit

    added 1 commit

    Compare with previous version

  • Michał Kudela added 1 commit

    added 1 commit

    • 0d7df52c - Create an AssetLimitT - type

    Compare with previous version

  • Michał Kudela added 5 commits

    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

    Compare with previous version

  • Michał Kudela added 1 commit

    added 1 commit

    • d41c5ea6 - fixup! Add tests to check the "Range" option associated with Assets

    Compare with previous version

  • Michał Kudela added 4 commits

    added 4 commits

    • 539d9de8 - Add tests to check the "Range" option associated with Assets
    • 0547622b - Describe the class `Range`
    • d06fed9d - Create an AssetLimitT - type
    • 4a0f7d0b - fixup! Describe the class `Range`

    Compare with previous version

  • Michał Kudela added 3 commits

    added 3 commits

    • 164edde7 - Add tests to check the "Range" option associated with Assets
    • 142ea039 - Describe the class `Range`
    • e44f7f0e - Create an AssetLimitT - type

    Compare with previous version

  • Michał Kudela added 1 commit

    added 1 commit

    • 38ecfe30 - fixup! Add tests to check the "Range" option associated with Assets

    Compare with previous version

  • Michał Kudela added 3 commits

    added 3 commits

    • 9c0e05e0 - Add tests to check the "Range" option associated with Assets
    • f5b3b9be - Describe the class `Range`
    • 63b5d68c - Create an AssetLimitT - type

    Compare with previous version

  • Mateusz Żebrak resolved all threads

    resolved all threads

  • Michał Kudela mentioned in merge request hive!911 (merged)

    mentioned in merge request hive!911 (merged)

  • Mateusz Żebrak approved this merge request

    approved this merge request

  • Krzysztof Mochocki approved this merge request

    approved this merge request

  • Krzysztof Mochocki marked this merge request as ready

    marked this merge request as ready

  • Please register or sign in to reply
    Loading