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