Runs some python code and test it with some doctest tests.
To download the the docker image and run the solutions and its tests.
docker run -ti --rm \
--net="none" \
--cap-drop=ALL \
singpath/verifier2-python:latest \
verify '---
tests: |
foo=1
solution: |
>>> foo
1
'
You can provide the solution/tests payload as JSON or YAML. If in YAML, the YAML document must start with "---".
To pass the content of a file:
docker run -ti --rm \
--net="none" \
--cap-drop=ALL \
singpath/verifier2-python:latest \
verify "$(< examples/pass.yaml)"
To build the verifier instead of downloading it:
git clone https://github.com/ChrisBoesch/singpath-verifiers.git
cd singpath-verifiers/python
make
docker run -ti --rm \
--net="none" \
--cap-drop=ALL \
singpath/verifier2-python:latest \
verify '---
tests: |
foo=1
solution: |
>>> foo
1
'
Content type
Image
Digest
sha256:1e0830ba9…
Size
77.3 MB
Last updated
over 10 years ago
docker pull singpath/verifier2-python