def test_dont_break_imports_without_namespaces():
 src = u('from __future__ import absolute_import\nimport xyzzy')
 parser = ParserWithRecovery(load_grammar(), src, 'test.py')
 assert parser.module.has_explicit_absolute_import

def test_dont_break_imports_without_namespaces ( ) : src = u ( 'from __future__ import absolute_import\nimport xyzzy' ) parser = ParserWithRecovery ( load_grammar ( ) , src , 'test.py' ) assert parser . module . has_explicit_absolute_import
the code checking for from __future__ import absolute_import shouldnt assume that all imports have non-none namespaces .