def test_global_as_constant(self):

    def f():
        x = None
        x = None
        return x

    def g():
        x = True
        return x

    def h():
        x = False
        return x
    for (func, elem) in ((f, None), (g, True), (h, False)):
        self.assertNotInBytecode(func, 'LOAD_GLOBAL')
        self.assertInBytecode(func, 'LOAD_CONST', elem)
        self.check_lnotab(func)

    def f():
        'Adding a docstring made this test fail in Py2.5.0'
        return None
    self.assertNotInBytecode(f, 'LOAD_GLOBAL')
    self.assertInBytecode(f, 'LOAD_CONST', None)
    self.check_lnotab(f)
def test_global_as_constant(self):

    def f():
        x = None
        x = None
        return x

    def g():
        x = True
        return x

    def h():
        x = False
        return x
    for (func, elem) in ((f, None), (g, True), (h, False)):
        self.assertNotInBytecode(func, 'LOAD_GLOBAL')
        self.assertInBytecode(func, 'LOAD_CONST', elem)
        self.check_lnotab(func)

    def f():
        'Adding a docstring made this test fail in Py2.5.0'
        return None
    self.assertNotInBytecode(f, 'LOAD_GLOBAL')
    self.assertInBytecode(f, 'LOAD_CONST', None)
    self.check_lnotab(f)