'Tests that fileinput.close() invokes close() on fileinput._state
and sets _state=None'

def test_state_is_not_None(self):

    instance = MockFileInput()
    fileinput._state = instance
    fileinput.close()
    self.assertExactlyOneInvocation(instance, 'close')
    self.assertIsNone(fileinput._state)
