def test_table_scraper():
    mongo = MongoManager()
    table_dict = mongo.get_table("PartyPoker 6 Players Fast Forward $1-$2 NL Hold'em")
    table_scraper = TableScraper(table_dict)
    table_scraper.screenshot = Image.open(os.path.join(get_dir('tests', 'screenshots'), '173280759_PreFlop_0.png'))
    table_scraper.crop_from_top_left_corner()
    table_scraper.is_my_turn()
    table_scraper.lost_everything()
    table_scraper.get_my_cards2()
    table_scraper.get_table_cards2()
    table_scraper.get_dealer_position2()
    table_scraper.get_players_in_game()
    table_scraper.get_pots()
    table_scraper.get_players_funds()
    table_scraper.get_call_value()
    table_scraper.get_raise_value()
    table_scraper.has_all_in_call_button()
    table_scraper.has_call_button()
    table_scraper.has_raise_button()
Exemple #2
0
 def test_all(self):
     """Test table button"""
     self.table_name = self.ui.table_name.currentText()
     from poker.scraper.recognize_table import TableScraper
     table_dict = mongo.get_table(table_name=self.table_name)
     table_scraper = TableScraper(table_dict)
     table_scraper.screenshot = self.original_screenshot
     table_scraper.crop_from_top_left_corner()
     table_scraper.is_my_turn()
     table_scraper.lost_everything()
     table_scraper.get_my_cards2()
     table_scraper.get_table_cards2()
     table_scraper.get_dealer_position2()
     table_scraper.get_players_in_game()
     table_scraper.get_pots()
     table_scraper.get_players_funds()
     table_scraper.get_call_value()
     table_scraper.get_raise_value()
     table_scraper.has_all_in_call_button()
     table_scraper.has_call_button()
     table_scraper.has_raise_button()
Exemple #3
0
def test_table_scraper():
    mongo = MongoManager()
    table_dict = mongo.get_table('default')
    table_scraper = TableScraper(table_dict)
    table_scraper.screenshot = Image.open(
        os.path.join(get_dir('tests', 'screenshots'), 'screenshot1.png'))
    table_scraper.crop_from_top_left_corner()
    table_scraper.is_my_turn()
    table_scraper.lost_everything()
    table_scraper.get_my_cards2()
    table_scraper.get_table_cards2()
    table_scraper.get_dealer_position2()
    table_scraper.get_players_in_game()
    table_scraper.get_pots()
    table_scraper.get_players_funds()
    table_scraper.get_call_value()
    table_scraper.get_raise_value()
    table_scraper.has_all_in_call_button()
    table_scraper.has_call_button()
    table_scraper.has_raise_button()
    table_scraper.get_game_number_on_screen2()