def testIsExtraRequire_methodNotOnClass(self):
    input_lines = [
        'goog.require(\'package.subpackage.method\');',
        'var x = package.subpackage.method()',
    ]

    token, namespaces_info = self._GetStartTokenAndNamespacesInfoForScript(
        input_lines, ['package'])

    self.assertFalse(namespaces_info.IsExtraRequire(token),
                    'Methods can be required except on classes.');
Tests that requiring a method not on a class is OK.
dataset/ETHPy150Open google/closure-linter/closure_linter/closurizednamespacesinfo_test.py/ClosurizedNamespacesInfoTest.testIsExtraRequire_methodNotOnClass