8000 STY: Splitext · sphinx-gallery/sphinx-gallery@be65cde · GitHub
[go: up one dir, main page]

Skip to content

Commit be65cde

Browse files
committed
STY: Splitext
1 parent 12a8374 commit be65cde

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool:pytest]
2-
addopts = --cov-report= --cov=sphinx_gallery --durations=5 -ra
2+
addopts = --cov-report= --cov=sphinx_gallery --durations=5 -ra --showlocals
33
python_files = tests/*.py
44
norecursedirs = build _build auto_examples gen_modules
55
sphinx_gallery/tests/tinybuild

sphinx_gallery/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def _replace_md5(fname_new, fname_old=None, method='move'):
104104
assert method in ('move', 'copy')
105105
if fname_old is None:
106106
assert fname_new.endswith('.new')
107-
fname_old = fname_new[:-4]
107+
fname_old = os.path.splitext(fname_new)[0]
108108
if os.path.isfile(fname_old) and (get_md5sum(fname_old) ==
109109
get_md5sum(fname_new)):
110110
if method == 'move':

0 commit comments

Comments
 (0)
0