Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bd04039

Browse files
committedMar 24, 2023
Add tox
1 parent f569dd2 commit bd04039

File tree

5 files changed

+44
-0
lines changed

5 files changed

+44
-0
lines changed
 

‎library/tox

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Maintainers: Elisey Zanko <elisey.zanko@gmail.com> (@31z4)
2+
GitRepo: https://github.com/31z4/tox-docker.git
3+
GitFetch: refs/heads/main
4+
Architectures: amd64, arm64v8, ppc64le, s390x
5+
6+
Tags: 4-3, 4-3.0, 4-3.0.1, 4, 4.4-3, 4.4-3.0, 4.4-3.0.1, 4.4, 4.4.7-3, 4.4.7-3.0, 4.4.7-3.0.1, 4.4.7, latest
7+
GitCommit: 881e2f195d431ca14d1da7e2e5044c3e0ff932b7

‎test/config.sh

+3
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,9 @@ imageTests+=(
265265
[tomcat]='
266266
tomcat-hello-world
267267
'
268+
[tox]='
269+
tox-basics
270+
'
268271
[varnish]='
269272
varnish
270273
'

‎test/tests/tox-basics/run.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
set -x
4+
5+
set -eo pipefail
6+
7+
dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
8+
9+
image="$1"
10+
11+
newImage="$("$dir/../image-name.sh" librarytest/tox-basics "$image")"
12+
"$dir/../docker-build.sh" "dir" "$newImage" <<EOD
13+
FROM $image
14+
COPY dir/test.py tox.ini .
15+
EOD
16+
17+
docker run --rm "$newImage"

‎test/tests/tox-basics/test.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import unittest
2+
3+
4+
class Test(unittest.TestCase):
5+
def test(self):
6+
self.assertTrue(True)

‎test/tests/tox-basics/tox.ini

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[tox]
2+
envlist = py{311,310,39,38,37},black
3+
skipsdist = true
4+
skip_missing_interpreters = false
5+
6+
[testenv]
7+
commands = python -m unittest test.py
8+
9+
[testenv:black]
10+
deps = black
11+
commands = black --check test.py

0 commit comments

Comments
 (0)
Please sign in to comment.