def open_analyzer(test_file_name): settings = Settings() settings.model_version = 1 with open(os.path.join(basedir, test_file_name), 'rb') as f: analyzer = ImageAnalyzer(f, settings=settings) return analyzer
def test_load_old(): with open(example_filename('old_settings.dat')) as f: settings = Settings.load_from(f) control = Settings() control.model_version = 1 assert_settings_equal(settings, control)