def test_show_on_equal_image(self): height, width = 480, 640 img = np.ones(shape=(height, width, 3)) test_show = base_display.DisplayResults(title="Demo", display_ops=[]) resized_img = test_show.resize_to_fit_window(img) assert img.shape[0] + test_show.border_size_top == resized_img.shape[0]
def test_show_on_large_image(self): height, width = 720, 1280 img = np.ones(shape=(height, width, 3)) test_show = base_display.DisplayResults(title="Demo", display_ops=[]) resized_img = test_show.resize_to_fit_window(img) assert test_show.window_size[1] == resized_img.shape[1]