We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fccf9ab commit c6b1a07Copy full SHA for c6b1a07
Lib/test/test_tools/test_msgfmt.py
@@ -42,8 +42,11 @@ def test_compilation(self):
42
self.assertDictEqual(actual._catalog, expected._catalog)
43
44
def test_binary_header(self):
45
- with open(data_dir / "general.mo", "rb") as f:
46
- mo_data = f.read()
+ with temp_cwd():
+ tmp_mo_file = 'messages.mo'
47
+ compile_messages(data_dir / "general.po", tmp_mo_file)
48
+ with open(tmp_mo_file, 'rb') as f:
49
+ mo_data = f.read()
50
51
(
52
magic,
@@ -53,7 +56,7 @@ def test_binary_header(self):
53
56
trans_table_offset,
54
57
hash_table_size,
55
58
hash_table_offset,
- ) = struct.unpack("=Iiiiiii", mo_data[:28])
59
+ ) = struct.unpack("=7I", mo_data[:28])
60
61
self.assertEqual(magic, 0x950412de)
62
self.assertEqual(version, 0)
0 commit comments