'Tests fileinput.isstdin() when fileinput._state is None.
Ensure that it raises RuntimeError with a meaningful error message
and does not modify fileinput._state'

def test_state_is_None(self):

    fileinput._state = None
    with self.assertRaises(RuntimeError) as cm:
        fileinput.isstdin()
    self.assertEqual(('no    active    input()',), cm.exception.args)
    self.assertIsNone(fileinput._state)
