Skip to content

Commit 12d03e6

Browse files
committed
Remove unused test methods
1 parent d4e1237 commit 12d03e6

File tree

2 files changed

+0
-85
lines changed

2 files changed

+0
-85
lines changed

tests/conftest.py

-42
Original file line numberDiff line numberDiff line change
@@ -1632,40 +1632,6 @@ def limit_buy_order(limit_buy_order_open):
16321632
return order
16331633

16341634

1635-
@pytest.fixture(scope='function')
1636-
def market_buy_order():
1637-
return {
1638-
'id': 'mocked_market_buy',
1639-
'type': 'market',
1640-
'side': 'buy',
1641-
'symbol': 'mocked',
1642-
'timestamp': arrow.utcnow().int_timestamp * 1000,
1643-
'datetime': arrow.utcnow().isoformat(),
1644-
'price': 0.00004099,
1645-
'amount': 91.99181073,
1646-
'filled': 91.99181073,
1647-
'remaining': 0.0,
1648-
'status': 'closed'
1649-
}
1650-
1651-
1652-
@pytest.fixture
1653-
def market_sell_order():
1654-
return {
1655-
'id': 'mocked_limit_sell',
1656-
'type': 'market',
1657-
'side': 'sell',
1658-
'symbol': 'mocked',
1659-
'timestamp': arrow.utcnow().int_timestamp * 1000,
1660-
'datetime': arrow.utcnow().isoformat(),
1661-
'price': 0.00004173,
1662-
'amount': 91.99181073,
1663-
'filled': 91.99181073,
1664-
'remaining': 0.0,
1665-
'status': 'closed'
1666-
}
1667-
1668-
16691635
@pytest.fixture
16701636
def limit_buy_order_old():
16711637
return {
@@ -2946,14 +2912,6 @@ def limit_order(limit_buy_order_usdt, limit_sell_order_usdt):
29462912
}
29472913

29482914

2949-
@pytest.fixture(scope='function')
2950-
def market_order(market_buy_order_usdt, market_sell_order_usdt):
2951-
return {
2952-
'buy': market_buy_order_usdt,
2953-
'sell': market_sell_order_usdt
2954-
}
2955-
2956-
29572915
@pytest.fixture(scope='function')
29582916
def limit_order_open(limit_buy_order_usdt_open, limit_sell_order_usdt_open):
29592917
return {

tests/edge/test_edge.py

-43
Original file line numberDiff line numberDiff line change
@@ -30,49 +30,6 @@
3030
tests_start_time = arrow.get(2018, 10, 3)
3131
timeframe_in_minute = 60
3232

33-
# Helpers for this test file
34-
35-
36-
def _validate_ohlc(buy_ohlc_sell_matrice):
37-
for index, ohlc in enumerate(buy_ohlc_sell_matrice):
38-
# if not high < open < low or not high < close < low
39-
if not ohlc[3] >= ohlc[2] >= ohlc[4] or not ohlc[3] >= ohlc[5] >= ohlc[4]:
40-
raise Exception('Line ' + str(index + 1) + ' of ohlc has invalid values!')
41-
return True
42-
43-
44-
def _build_dataframe(buy_ohlc_sell_matrice):
45-
_validate_ohlc(buy_ohlc_sell_matrice)
46-
data = []
47-
for ohlc in buy_ohlc_sell_matrice:
48-
d = {
49-
'date': tests_start_time.shift(
50-
minutes=(
51-
ohlc[0] *
52-
timeframe_in_minute)).int_timestamp *
53-
1000,
54-
'buy': ohlc[1],
55-
'open': ohlc[2],
56-
'high': ohlc[3],
57-
'low': ohlc[4],
58-
'close': ohlc[5],
59-
'sell': ohlc[6]}
60-
data.append(d)
61-
62-
frame = DataFrame(data)
63-
frame['date'] = to_datetime(frame['date'],
64-
unit='ms',
65-
utc=True,
66-
infer_datetime_format=True)
67-
68-
return frame
69-
70-
71-
def _time_on_candle(number):
72-
return np.datetime64(tests_start_time.shift(
73-
minutes=(number * timeframe_in_minute)).int_timestamp * 1000, 'ms')
74-
75-
7633
# End helper functions
7734
# Open trade should be removed from the end
7835
tc0 = BTContainer(data=[

0 commit comments

Comments
 (0)