def test_6table_and_my_cards6(): # ok log = logging.getLogger(__name__) mongo = MongoManager() table_dict = mongo.get_table('GG_6TABLE') table_scraper = TableScraper(table_dict) table_scraper.screenshot = Image.open(os.path.join(os.environ['test_src1'], '5.png')) table_scraper.crop_from_top_left_corner2(select_table=0) table_scraper.get_my_cards3() assert set(table_scraper.my_cards) == set(['7D', '7H']) # ok
def test_table_and_my_cards39(): # ok log = logging.getLogger(__name__) mongo = MongoManager() table_dict = mongo.get_table('GG_6TABLE') table_scraper = TableScraper(table_dict) table_scraper.screenshot = Image.open(os.path.join(os.environ['test_src'], '10.png')) table_scraper.crop_from_top_left_corner2(select_table=3) table_scraper.get_my_cards3() print(table_scraper.table_cards) assert set(table_scraper.my_cards) == {'AH', 'KC'} # Passed
def test_6table_and_my_cards5(): # ok log = logging.getLogger(__name__) mongo = MongoManager() table_dict = mongo.get_table('GG_6TABLE') table_scraper = TableScraper(table_dict) # log.info(f'codebase dir: {get_dir("codebase")}') # log.info(f'cards dir: {get_dir(os.path.join("cards","values"))}') table_scraper.screenshot = Image.open(os.path.join(os.environ['test_src1'], '4.png')) table_scraper.crop_from_top_left_corner2(select_table=0) table_scraper.get_my_cards3() log.info(f'My cards: {table_scraper.my_cards}') assert set(table_scraper.my_cards) == set(['9H', 'KD']) # 8H duplicates 9H