We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
__future__
1 parent 1140f73 commit 3a4ebb5Copy full SHA for 3a4ebb5
Lib/test/test_future_stmt/test_future.py
@@ -203,6 +203,20 @@ def test_syntactical_future_repl(self):
203
out = kill_python(p)
204
self.assertNotIn(b'SyntaxError: invalid syntax', out)
205
206
+ def test_future_dotted_import(self):
207
+ with self.assertRaises(ImportError):
208
+ from .__future__ import annotations
209
+
210
211
+ from __future__ import print_function
212
+ from ...__future__ import annotations
213
214
+ code = """
215
+ from .__future__ import nested_scopes
216
+ from __future__ import barry_as_FLUFL
217
+ """
218
+ self.assertSyntaxError(code, lineno=2)
219
220
class AnnotationsFutureTestCase(unittest.TestCase):
221
template = dedent(
222
"""
0 commit comments