8000 Merge pull request #8065 from gfyoung/fromfile-assert-bug · numpy/numpy@55ece58 · GitHub
[go: up one dir, main page]

Skip to content

Commit 55ece58

Browse files
authored
Merge pull request #8065 from gfyoung/fromfile-assert-bug
BUG: Assert fromfile ending earlier in pyx_processing
2 parents ab0f63f + 4c877be commit 55ece58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/cythonize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ def process_tempita_pyx(fromfile, tofile):
9191
except ImportError:
9292
raise Exception('Building %s requires Tempita: '
9393
'pip install --user Tempita' % VENDOR)
94+
assert fromfile.endswith('.pyx.in')
9495
with open(fromfile, "r") as f:
9596
tmpl = f.read()
9697
pyxcontent = tempita.sub(tmpl)
97-
assert fromfile.endswith('.pyx.in')
9898
pyxfile = fromfile[:-len('.pyx.in')] + '.pyx'
9999
with open(pyxfile, "w") as f:
100100
f.write(pyxcontent)

0 commit comments

Comments
 (0)
0