def test_get_best_bbo_general_extended(self): book1 = OrderBook() book1.update_level(2, 4, True) book1.update_level(8, 6, True) book1.update_level(3, 5, False) book1.update_level(1, 2, False) assert book1.get_best_bbo() == (8, 6, 3, 5)
def test_get_best_bbo_empty_buy_list(self): book1 = OrderBook() book1.update_level(2, 4, False) assert book1.get_best_bbo() == (None, None, 2, 4)
def test_get_best_bbo_empty_sell_list(self): book1 = OrderBook() book1.update_level(2, 4, True) assert book1.get_best_bbo() == (2, 4, None, None)
def test_get_best_bbo_empty_lists(self): book1 = OrderBook() book1.update_level(2, 0, True) book1.update_level(3, 0, False) assert book1.get_best_bbo() == (None, None, None, None)
def test_get_best_bbo_general(self): book1 = OrderBook() book1.update_level(2, 4, True) book1.update_level(3, 5, False) assert book1.get_best_bbo() == (2, 4, 3, 5)