(self)
| 116 | assert len(load_main_index(out_dir=OUTPUT_DIR)) == 0 |
| 117 | |
| 118 | def test_conflicting_init(self): |
| 119 | with open(Path(OUTPUT_DIR) / 'test_conflict.txt', 'w+', encoding='utf-8') as f: |
| 120 | f.write('test') |
| 121 | |
| 122 | try: |
| 123 | with output_hidden(show_failing=False): |
| 124 | archivebox_init.main([]) |
| 125 | assert False, 'Init should have exited with an exception' |
| 126 | except SystemExit: |
| 127 | pass |
| 128 | |
| 129 | assert not (Path(OUTPUT_DIR) / SQL_INDEX_FILENAME).exists() |
| 130 | assert not (Path(OUTPUT_DIR) / JSON_INDEX_FILENAME).exists() |
| 131 | assert not (Path(OUTPUT_DIR) / HTML_INDEX_FILENAME).exists() |
| 132 | try: |
| 133 | load_main_index(out_dir=OUTPUT_DIR) |
| 134 | assert False, 'load_main_index should raise an exception when no index is present' |
| 135 | except Exception: |
| 136 | pass |
| 137 | |
| 138 | def test_no_dirty_state(self): |
| 139 | with output_hidden(): |
nothing calls this directly
no test coverage detected