(self)
| 5067 | self.assertRaises(FileNotFoundError, os.scandir, '') |
| 5068 | |
| 5069 | def test_consume_iterator_twice(self): |
| 5070 | self.create_file("file.txt") |
| 5071 | iterator = os.scandir(self.path) |
| 5072 | |
| 5073 | entries = list(iterator) |
| 5074 | self.assertEqual(len(entries), 1, entries) |
| 5075 | |
| 5076 | # check than consuming the iterator twice doesn't raise exception |
| 5077 | entries2 = list(iterator) |
| 5078 | self.assertEqual(len(entries2), 0, entries2) |
| 5079 | |
| 5080 | def test_bad_path_type(self): |
| 5081 | for obj in [1.234, {}, []]: |
nothing calls this directly
no test coverage detected