generated from FNNDSC/python-chrisapp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
455b243
commit 97d7692
Showing
7 changed files
with
62 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
# Python version can be changed, e.g. | ||
# FROM python:3.8 | ||
# FROM docker.io/fnndsc/conda:python3.10.2-cuda11.6.0 | ||
FROM docker.io/python:3.10.6-slim-bullseye | ||
FROM docker.io/fnndsc/mni-conda-base:civet2.1.1-python3.10.6 | ||
|
||
LABEL org.opencontainers.image.authors="FNNDSC <[email protected]>" \ | ||
org.opencontainers.image.title="create_tetra" \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from pytest_mock import MockerFixture | ||
from pathlib import Path | ||
import subprocess | ||
from create_tetra_wrapper import parser, main | ||
|
||
|
||
def test_main(mocker: MockerFixture, tmp_path: Path): | ||
""" | ||
Running main w/o options should create a unit sphere. | ||
""" | ||
outputdir = tmp_path / 'outgoing' | ||
output_file = outputdir / 'sphere_81920.obj' | ||
|
||
options = parser.parse_args([]) | ||
spy = mocker.spy(subprocess, 'run') | ||
main(options, outputdir) | ||
assert output_file.exists() | ||
spy.assert_called_once() | ||
assert spy.call_args[0][0][0] == 'create_tetra' |