Example #1
0
def differences():
    return compare_mo_files(TEST_FILE1_PATH, TEST_FILE2_PATH).details
Example #2
0
def test_charsets():
    difference = compare_mo_files(os.path.join(os.path.dirname(__file__), '../data/test_no_charset.mo'),
                                   os.path.join(os.path.dirname(__file__), '../data/test_iso8859-1.mo'))
    expected_diff = codecs.open(os.path.join(os.path.dirname(__file__), '../data/mo_charsets_expected_diff'), encoding='utf-8').read()
    assert difference.details[0].unified_diff == expected_diff
Example #3
0
def test_no_differences():
    difference = compare_mo_files(TEST_FILE1_PATH, TEST_FILE1_PATH)
    assert difference is None