MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_hierarchy

Method test_hierarchy

Lib/test/test_email/test_email.py:1887–1903  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1885 self._txt = intro
1886
1887 def test_hierarchy(self):
1888 # convenience
1889 eq = self.assertEqual
1890 raises = self.assertRaises
1891 # tests
1892 m = self._msg
1893 self.assertTrue(m.is_multipart())
1894 eq(m.get_content_type(), 'multipart/mixed')
1895 eq(len(m.get_payload()), 2)
1896 raises(IndexError, m.get_payload, 2)
1897 m0 = m.get_payload(0)
1898 m1 = m.get_payload(1)
1899 self.assertIs(m0, self._txt)
1900 self.assertIs(m1, self._im)
1901 eq(m.get_payload(), [m0, m1])
1902 self.assertFalse(m0.is_multipart())
1903 self.assertFalse(m1.is_multipart())
1904
1905 def test_empty_multipart_idempotent(self):
1906 text = """\

Callers

nothing calls this directly

Calls 9

lenFunction · 0.85
raisesFunction · 0.85
assertTrueMethod · 0.80
is_multipartMethod · 0.80
get_content_typeMethod · 0.80
get_payloadMethod · 0.80
assertFalseMethod · 0.80
eqFunction · 0.50
assertIsMethod · 0.45

Tested by

no test coverage detected