Skip to content

Commit 8236ac6

Browse files
committed
Confirm Python 3.12 and fix failing test
Confirmed that all tests pass with a Python 3.12 virtual environment (and fixes a flaky test)
1 parent a77266f commit 8236ac6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

jupyter_book_to_htmlbook/file_processing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def process_chapter_soup(
215215

216216
# perform initial swapping and namespace designation
217217
chapter, bib = get_main_section(base_soup)
218-
if bib and not chapter: # bibs can be their own chapters
218+
if bib and not chapter or bib == chapter: # bibs can be their own chapters
219219
chapter = bib
220220
bib = None
221221

tests/test_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def test_missing_files_raises_python_error(self,
150150
monkeypatch.chdir(tmp_path) # patch for our build target
151151
result = runner.invoke(app, [str(test_env), 'build'])
152152
assert result.exit_code != 0
153-
assert type(result.exception) == FileNotFoundError
153+
assert type(result.exception) is FileNotFoundError
154154

155155
@pytest.mark.jb
156156
@pytest.mark.slow

0 commit comments

Comments
 (0)