def test_read_one_episode(self): trade = Trade() trade.new_episode() num_of_records = 0 for i in range(1000): if trade.new_sec(): self.assertIsNotNone(trade.boards) self.assertIsNotNone(trade.buy_trade_price) self.assertIsNotNone(trade.sell_trade_price) self.assertIsNotNone(trade.buy_book_price) self.assertIsNotNone(trade.sell_book_vol) self.assertIsNotNone(trade.sell_book_price) self.assertIsNotNone(trade.buy_book_vol) self.assertIsNotNone(trade.market_sell_price) self.assertIsNotNone(trade.buy_trade_vol) self.assertIsNotNone(trade.fix_buy_price) self.assertIsNotNone(trade.market_buy_price) self.assertIsNotNone(trade.time) num_of_records += 1 print(trade.time) else: break print(num_of_records)
def test_read_one_episode(self): trade = Trade() trade.new_episode() num_of_records = 0 while trade.new_sec(): self.assertIsNotNone(trade.board) self.assertIsNotNone(trade.buy_trade_price) self.assertIsNotNone(trade.sell_trade_price) self.assertIsNotNone(trade.buy_book_price) self.assertIsNotNone(trade.sell_book_vol) self.assertIsNotNone(trade.sell_book_price) self.assertIsNotNone(trade.buy_book_vol) self.assertIsNotNone(trade.market_sell_price) self.assertIsNotNone(trade.buy_trade_vol) self.assertIsNotNone(trade.fix_buy_price) self.assertIsNotNone(trade.market_buy_price) self.assertIsNotNone(trade.time) print(trade.time) num_of_records += 1 print(num_of_records)
def test_new_episode(self): trade = Trade() trade.new_episode() result = trade.new_sec() print(result) print(trade.time)
def test_new_sec(self): trade = Trade() trade.new_episode() trade.new_sec() print(trade.time) trade.new_sec() print(trade.time) trade.new_sec() print(trade.time) trade.new_sec() print(trade.time)