(self)
| 194 | |
| 195 | class TestBugReports(unittest.TestCase): |
| 196 | def test_issue_847(self): |
| 197 | with tempfile.TemporaryDirectory() as import_test_folder: |
| 198 | # ./xyzzy |
| 199 | # ./xyzzy/__init__.py |
| 200 | # ./xyzzy/plugh |
| 201 | # ./xyzzy/plugh/__init__.py |
| 202 | # ./xyzzy/plugh/bar.py |
| 203 | # ./xyzzy/plugh/foo.py |
| 204 | |
| 205 | base_path = Path(import_test_folder) |
| 206 | (base_path / "xyzzy" / "plugh").mkdir(parents=True) |
| 207 | (base_path / "xyzzy" / "__init__.py").touch() |
| 208 | (base_path / "xyzzy" / "plugh" / "__init__.py").touch() |
| 209 | (base_path / "xyzzy" / "plugh" / "bar.py").touch() |
| 210 | (base_path / "xyzzy" / "plugh" / "foo.py").touch() |
| 211 | |
| 212 | module_gatherer = ModuleGatherer((base_path.absolute(),)) |
| 213 | while module_gatherer.find_coroutine(): |
| 214 | pass |
| 215 | |
| 216 | self.assertSetEqual( |
| 217 | module_gatherer.complete(17, "from xyzzy.plugh."), |
| 218 | {"xyzzy.plugh.bar", "xyzzy.plugh.foo"}, |
| 219 | ) |
| 220 | |
| 221 | |
| 222 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected