Test module without __init__.py. https://github.com/ipython/ipython/issues/11226
()
| 162 | |
| 163 | |
| 164 | def test_module_without_init(): |
| 165 | """ |
| 166 | Test module without __init__.py. |
| 167 | |
| 168 | https://github.com/ipython/ipython/issues/11226 |
| 169 | """ |
| 170 | fake_module_name = "foo" |
| 171 | with TemporaryDirectory() as tmpdir: |
| 172 | sys.path.insert(0, tmpdir) |
| 173 | try: |
| 174 | os.makedirs(os.path.join(tmpdir, fake_module_name)) |
| 175 | s = try_import(mod=fake_module_name) |
| 176 | assert s == [] |
| 177 | finally: |
| 178 | sys.path.remove(tmpdir) |
nothing calls this directly
no test coverage detected