예제 #1
0
def test_snap_to_decimal_move_out_by_out_of_range():
    eq_(None, Odds.snap_to_decimal_move_out_by('sell', Decimal('18.6'), 5000))
예제 #2
0
def test_snap_to_decimal_move_out_by_sell():
    eq_(Decimal('16.95'), Odds.snap_to_decimal_move_out_by('sell', Decimal('18.6'), 5).percent)
예제 #3
0
def test_snap_to_decimal_move_out_by():
    eq_(Decimal('19.23'), Odds.snap_to_decimal_move_out_by('buy', Decimal('18.6'), 1).percent)
예제 #4
0
def test_snap_to_decimal_move_out_by_out_of_range():
    eq_(None, Odds.snap_to_decimal_move_out_by('sell', Decimal('18.6'), 5000))
예제 #5
0
def test_snap_to_decimal_move_out_by_sell():
    eq_(Decimal('16.95'),
        Odds.snap_to_decimal_move_out_by('sell', Decimal('18.6'), 5).percent)
예제 #6
0
def test_snap_to_decimal_move_out_by():
    eq_(Decimal('19.23'),
        Odds.snap_to_decimal_move_out_by('buy', Decimal('18.6'), 1).percent)