Test module with invalid __all__ https://github.com/ipython/ipython/issues/9678
()
| 148 | |
| 149 | |
| 150 | def test_bad_module_all(): |
| 151 | """Test module with invalid __all__ |
| 152 | |
| 153 | https://github.com/ipython/ipython/issues/9678 |
| 154 | """ |
| 155 | testsdir = os.path.dirname(__file__) |
| 156 | sys.path.insert(0, testsdir) |
| 157 | try: |
| 158 | results = module_completion("from bad_all import ") |
| 159 | assert "puppies" in results |
| 160 | for r in results: |
| 161 | assert isinstance(r, str) |
| 162 | |
| 163 | # bad_all doesn't contain submodules, but this completion |
| 164 | # should finish without raising an exception: |
| 165 | results = module_completion("import bad_all.") |
| 166 | assert results == [] |
| 167 | finally: |
| 168 | sys.path.remove(testsdir) |
| 169 | |
| 170 | |
| 171 | def test_module_without_init(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…