def test_import_submodule_global_shadowed(pyi_builder):
 pyi_builder.test_source('\n        # Assert that this submodule is shadowed by a string global variable.\n        from pyi_testmod_submodule_global_shadowed import submodule\n        assert type(submodule) == str\n\n        # Assert that this submodule is still frozen into this test application.\n        # To do so:\n        #\n        # 1. Delete this global variable from its parent package.\n        # 2. Assert that this submodule is unshadowed by this global variable.\n        import pyi_testmod_submodule_global_shadowed, sys\n        del  pyi_testmod_submodule_global_shadowed.submodule\n        from pyi_testmod_submodule_global_shadowed import submodule\n        assert type(submodule) == type(sys)\n        ')

def test_import_submodule_global_shadowed ( pyi_builder ) : pyi_builder . test_source ( '\n        # Assert that this submodule is shadowed by a string global variable.\n        from pyi_testmod_submodule_global_shadowed import submodule\n        assert type(submodule) == str\n\n        # Assert that this submodule is still frozen into this test application.\n        # To do so:\n        #\n        # 1. Delete this global variable from its parent package.\n        # 2. Assert that this submodule is unshadowed by this global variable.\n        import pyi_testmod_submodule_global_shadowed, sys\n        del  pyi_testmod_submodule_global_shadowed.submodule\n        from pyi_testmod_submodule_global_shadowed import submodule\n        assert type(submodule) == type(sys)\n        ' )
functional test validating issue #1919 .