(self)
| 5201 | return self.get_entry(os.path.basename(filename)) |
| 5202 | |
| 5203 | def test_current_directory(self): |
| 5204 | filename = self.create_file() |
| 5205 | old_dir = os.getcwd() |
| 5206 | try: |
| 5207 | os.chdir(self.path) |
| 5208 | |
| 5209 | # call scandir() without parameter: it must list the content |
| 5210 | # of the current directory |
| 5211 | entries = dict((entry.name, entry) for entry in os.scandir()) |
| 5212 | self.assertEqual(sorted(entries.keys()), |
| 5213 | [os.path.basename(filename)]) |
| 5214 | finally: |
| 5215 | os.chdir(old_dir) |
| 5216 | |
| 5217 | def test_repr(self): |
| 5218 | entry = self.create_file_entry() |
nothing calls this directly
no test coverage detected