def testIsExtraRequire_constantOnClass(self):
    input_lines = [
        'goog.require(\'package.Foo.CONSTANT\');',
        'var x = package.Foo.CONSTANT',
    ]

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

    self.assertTrue(namespaces_info.IsExtraRequire(token),
                    'The class, not the constant, should be required.');
Tests that requiring a constant on a class is extra.
dataset/ETHPy150Open google/closure-linter/closure_linter/closurizednamespacesinfo_test.py/ClosurizedNamespacesInfoTest.testIsExtraRequire_constantOnClass