MCPcopy Index your code
hub / github.com/python/cpython / test_state_is_None

Method test_state_is_None

Lib/test/test_fileinput.py:633–638  ·  view source on GitHub ↗

Tests that fileinput.close() does nothing if fileinput._state is None

(self)

Source from the content-addressed store, hash-verified

631 """Unit tests for fileinput.close()"""
632
633 def test_state_is_None(self):
634 """Tests that fileinput.close() does nothing if fileinput._state
635 is None"""
636 fileinput._state = None
637 fileinput.close()
638 self.assertIsNone(fileinput._state)
639
640 def test_state_is_not_None(self):
641 """Tests that fileinput.close() invokes close() on fileinput._state

Callers

nothing calls this directly

Calls 2

assertIsNoneMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected