def test_disabled_enable_debug() -> None: """Check that enable_debug=False works.""" tc.assertTrue( is_file_exists(get_absolute_from_current_path(__file__, "0001.png")) ) copy_file( get_absolute_from_current_path(__file__, "0001.png"), get_absolute_from_current_path(__file__, "0001_debug.png"), ) SeparatePage().treat_file( get_absolute_from_current_path(__file__, "0001_debug.png"), debug=DebugImage(DebugImage.Level.OFF), ) delete_file(get_absolute_from_current_path(__file__, "0001_debug.png"))
def test_mock_stop_at_5() -> None: """Check that stop_at 5 works.""" tc.assertTrue( is_file_exists(get_absolute_from_current_path(__file__, "0001.png")) ) copy_file( get_absolute_from_current_path(__file__, "0001.png"), get_absolute_from_current_path(__file__, "0001_5.png"), ) del_pattern(extract_path(__file__), "0001_5.png_*") MockDisableSeparatePage(5).treat_file( get_absolute_from_current_path(__file__, "0001_5.png"), debug=DebugImage(DebugImage.Level.TOP), ) delete_file(get_absolute_from_current_path(__file__, "0001_5.png")) tc.assertTrue( is_file_exists( get_absolute_from_current_path(__file__, "0001_5.png_1_1.png") ) ) tc.assertTrue( is_file_exists( get_absolute_from_current_path(__file__, "0001_5.png_2_1.png") ) ) tc.assertTrue( is_file_exists( get_absolute_from_current_path(__file__, "0001_5.png_3_1.png") ) ) tc.assertTrue( is_file_exists( get_absolute_from_current_path(__file__, "0001_5.png_3_2.png") ) ) tc.assertTrue( is_file_exists( get_absolute_from_current_path(__file__, "0001_5.png_4_1.png") ) ) tc.assertTrue( is_file_exists( get_absolute_from_current_path(__file__, "0001_5.png_5_1.png") ) ) tc.assertTrue( is_file_exists( get_absolute_from_current_path(__file__, "0001_5.png_6_1.png") ) ) tc.assertTrue( is_file_exists( get_absolute_from_current_path(__file__, "0001_5.png_6_2.png") ) ) tc.assertTrue( is_file_exists( get_absolute_from_current_path(__file__, "0001_5.png_7_1.png") ) ) tc.assertTrue( is_file_exists( get_absolute_from_current_path(__file__, "0001_5.png_7_2.png") ) ) tc.assertTrue( is_file_exists( get_absolute_from_current_path(__file__, "0001_5.png_page_1.png") ) ) tc.assertTrue( is_file_exists( get_absolute_from_current_path(__file__, "0001_5.png_page_2.png") ) )