MCPcopy Index your code
hub / github.com/python/cpython / test_staticmethods_in_c

Method test_staticmethods_in_c

Lib/test/test_descr.py:1854–1866  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1852 @support.impl_detail("the module 'xxsubtype' is internal")
1853 @unittest.skipIf(xxsubtype is None, "requires xxsubtype module")
1854 def test_staticmethods_in_c(self):
1855 # Testing C-based static methods...
1856 import xxsubtype as spam
1857 a = (1, 2, 3)
1858 d = {"abc": 123}
1859 x, a1, d1 = spam.spamlist.staticmeth(*a, **d)
1860 self.assertEqual(x, None)
1861 self.assertEqual(a, a1)
1862 self.assertEqual(d, d1)
1863 x, a1, d2 = spam.spamlist().staticmeth(*a, **d)
1864 self.assertEqual(x, None)
1865 self.assertEqual(a, a1)
1866 self.assertEqual(d, d1)
1867
1868 def test_classic(self):
1869 # Testing classic classes...

Callers

nothing calls this directly

Calls 3

staticmethMethod · 0.80
spamlistMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected