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

Method test__future__imports

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

Source from the content-addressed store, hash-verified

1255''' % __name__)
1256
1257 def test__future__imports(self):
1258 # __future__ features are excluded from module help,
1259 # except when it's the __future__ module itself
1260 import __future__
1261 future_text, _ = get_pydoc_text(__future__)
1262 future_html, _ = get_pydoc_html(__future__)
1263 pydoc_mod_text, _ = get_pydoc_text(pydoc_mod)
1264 pydoc_mod_html, _ = get_pydoc_html(pydoc_mod)
1265
1266 for feature in __future__.all_feature_names:
1267 txt = f"{feature} = _Feature"
1268 html = f"<strong>{feature}</strong> = _Feature"
1269 self.assertIn(txt, future_text)
1270 self.assertIn(html, future_html)
1271 self.assertNotIn(txt, pydoc_mod_text)
1272 self.assertNotIn(html, pydoc_mod_html)
1273
1274
1275class 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