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

Method test__future__imports

Lib/test/test_pydoc/test_pydoc.py:1248–1263  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1246''' % __name__)
1247
1248 def test__future__imports(self):
1249 # __future__ features are excluded from module help,
1250 # except when it's the __future__ module itself
1251 import __future__
1252 future_text, _ = get_pydoc_text(__future__)
1253 future_html, _ = get_pydoc_html(__future__)
1254 pydoc_mod_text, _ = get_pydoc_text(pydoc_mod)
1255 pydoc_mod_html, _ = get_pydoc_html(pydoc_mod)
1256
1257 for feature in __future__.all_feature_names:
1258 txt = f"{feature} = _Feature"
1259 html = f"<strong>{feature}</strong> = _Feature"
1260 self.assertIn(txt, future_text)
1261 self.assertIn(html, future_html)
1262 self.assertNotIn(txt, pydoc_mod_text)
1263 self.assertNotIn(html, pydoc_mod_html)
1264
1265
1266class PydocImportTest(PydocBaseTest):

Callers

nothing calls this directly

Calls 4

get_pydoc_textFunction · 0.85
get_pydoc_htmlFunction · 0.85
assertInMethod · 0.80
assertNotInMethod · 0.80

Tested by

no test coverage detected