Skip to content

Commit e1a7cec

Browse files
committed
feat(bindgen): emscripten python test output dir -> "tests"
1 parent 6dd8fe8 commit e1a7cec

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/core/typescript/itk-wasm/src/bindgen/python/emscripten/emscripten-test-module.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import path from 'path'
44
import mkdirP from '../../mkdir-p.js'
55

66
function emscriptenTestModule(packageDir, pypackage) {
7-
mkdirP(path.join(packageDir, 'test'))
7+
const testDir = path.join(packageDir, 'tests')
8+
mkdirP(testDir)
89

910
let moduleContent = `import pytest
1011
import sys
@@ -28,11 +29,14 @@ async def test_example(selenium, package_wheel):
2829
# Write your test code here
2930
`
3031

31-
const modulePath = path.join(packageDir, 'test', `test_${pypackage.replace('_emscripten', '')}.py`)
32+
const modulePath = path.join(
33+
testDir,
34+
`test_${pypackage.replace('_emscripten', '')}.py`
35+
)
3236
if (!fs.existsSync(modulePath)) {
3337
fs.writeFileSync(modulePath, moduleContent)
3438
}
35-
const initPath = path.join(packageDir, 'test', '__init__.py')
39+
const initPath = path.join(testDir, '__init__.py')
3640
if (!fs.existsSync(initPath)) {
3741
fs.writeFileSync(initPath, '')
3842
}

0 commit comments

Comments
 (0)