Whole file

tuvistavie/python-i18n

The author described this change as Update test directory layout. Fix test OS compatibility.. It counts as a record because the checks below fail on the code as it stood at e8bcd9cac and pass on fdb3c155e, with nothing else changed between the two runs.

Fix saved2013-03-12
Sharing licenceMIT · LICENSE
Change size+2 2

What the code was meant to do, written into the code itself as a save note

Update test directory layout. Fix test OS compatibility.

The change

5555 raise I18nFileLoadError("incorrect file format.")
5656 return namespace
5757
58-def load_translation_file(filepath):
59- translations = load_resource(filepath, config.get('locale'))
58+def load_translation_file(filepath, base_directory):
59+ translations = load_resource(os.path.join(base_directory, filepath), config.get('locale'))
6060 namespace = get_namespace_from_filepath(filepath)
6161 load_translation_dic(translations, namespace)
6262

The check that tells the two apart

failpass·i18n/tests/loader_tests.py::TestFileLoader::test_load_file_with_strange_encoding
failpass·i18n/tests/loader_tests.py::TestFileLoader::test_load_json_file
failpass·i18n/tests/loader_tests.py::TestFileLoader::test_load_wrong_json_file

Check file i18n/tests/loader_tests.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before ite8bcd9cac344dfc02c975ef13ce5020e48b91131
Broken version dated2013-03-12
Modulei18n.resource_loader
Units changedload_translation_file
Fingerprinta0e0c92fa7f93807
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.