def test_scan_for_close(self):
    img = os.path.join(self.provider.assets, 'steam', 'steam_close.png')
    area = self.provider.predefined.main_area
    area['width'] = 400
    t = tm.BoundingTrainer(img, bounding_area=area)
    location = os.path.join(self.provider.assets, 'close.png')
    self.assertTrue((t.get_matches(location, 3) is True), 'Expecting a back button')
    img = os.path.join(self.provider.assets, 'steam', 'steam_ok.png')
    t = tm.BoundingTrainer(img, bounding_area=area)
    location = os.path.join(self.provider.assets, 'close.png')
    t.get_matches(location, 3)
    self.assertTrue((t.get_matches(location, 3) is False), 'Is Ok button not close')
def test_scan_for_close(self):
    img = os.path.join(self.provider.assets, 'steam', 'steam_close.png')
    area = self.provider.predefined.main_area
    area['width'] = 400
    t = tm.BoundingTrainer(img, bounding_area=area)
    location = os.path.join(self.provider.assets, 'close.png')
    self.assertTrue((t.get_matches(location, 3) is True), 'Expecting a back button')
    img = os.path.join(self.provider.assets, 'steam', 'steam_ok.png')
    t = tm.BoundingTrainer(img, bounding_area=area)
    location = os.path.join(self.provider.assets, 'close.png')
    t.get_matches(location, 3)
    self.assertTrue((t.get_matches(location, 3) is False), 'Is Ok button not close')