MCPcopy Index your code
hub / github.com/RustPython/RustPython / testWarnings

Method testWarnings

Lib/test/test_fileio.py:715–721  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

713 self.assertRaises(TypeError, self.FileIO, "1", 0, 0)
714
715 def testWarnings(self):
716 with check_warnings(quiet=True) as w:
717 self.assertEqual(w.warnings, [])
718 self.assertRaises(TypeError, self.FileIO, [])
719 self.assertEqual(w.warnings, [])
720 self.assertRaises(ValueError, self.FileIO, "/some/invalid/name", "rt")
721 self.assertEqual(w.warnings, [])
722
723 def testUnclosedFDOnException(self):
724 class MyException(Exception): pass

Callers

nothing calls this directly

Calls 3

check_warningsFunction · 0.90
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected