test_utils.py 362 B

12345678910
  1. # -*- coding: utf-8 -*-
  2. #!/usr/bin/env python
  3. from hypothesis import given, strategies as st
  4. @given(st.floats(min_value=10, max_value=10000), st.floats(min_value=0.06, max_value=0.90))
  5. def test_if_money_add_up(withdraw_amount, ratio):
  6. """测试提现金额"""
  7. assert round(withdraw_amount * ratio, 2) + round(withdraw_amount * (1 - ratio), 2)