Skip to content

Commit d80081f

Browse files
authored
Merge pull request #13646 from afeddersen/apt1
Adding 10 Python package tests - #2
2 parents 7eaad37 + d58e286 commit d80081f

10 files changed

Lines changed: 175 additions & 4 deletions

py3-click.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,22 @@ update:
4141
enabled: true
4242
github:
4343
identifier: pallets/click
44+
45+
test:
46+
environment:
47+
contents:
48+
packages:
49+
- busybox
50+
pipeline:
51+
- runs: |
52+
LIBRARY="click"
53+
IMPORT_STATEMENT="import click"
54+
55+
if ! python -c "$IMPORT_STATEMENT"; then
56+
echo "Failed to import library '$LIBRARY'."
57+
python -c "$IMPORT_STATEMENT" 2>&1
58+
exit 1
59+
else
60+
echo "Library '$LIBRARY' is installed and can be imported successfully."
61+
exit 0
62+
fi

py3-cloudpickle.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,22 @@ update:
4141
strip-prefix: v
4242
use-tag: true
4343
tag-filter: v
44+
45+
test:
46+
environment:
47+
contents:
48+
packages:
49+
- busybox
50+
pipeline:
51+
- runs: |
52+
LIBRARY="cloudpickle"
53+
IMPORT_STATEMENT="import cloudpickle"
54+
55+
if ! python -c "$IMPORT_STATEMENT"; then
56+
echo "Failed to import library '$LIBRARY'."
57+
python -c "$IMPORT_STATEMENT" 2>&1
58+
exit 1
59+
else
60+
echo "Library '$LIBRARY' is installed and can be imported successfully."
61+
exit 0
62+
fi

py3-cmaes.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,22 @@ update:
4141
github:
4242
identifier: CyberAgentAILab/cmaes
4343
strip-prefix: v
44+
45+
test:
46+
environment:
47+
contents:
48+
packages:
49+
- busybox
50+
pipeline:
51+
- runs: |
52+
LIBRARY="cmaes"
53+
IMPORT_STATEMENT="from cmaes import CMA"
54+
55+
if ! python -c "$IMPORT_STATEMENT"; then
56+
echo "Failed to import library '$LIBRARY'."
57+
python -c "$IMPORT_STATEMENT" 2>&1
58+
exit 1
59+
else
60+
echo "Library '$LIBRARY' is installed and can be imported successfully."
61+
exit 0
62+
fi

py3-codeowners.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,22 @@ update:
3636
manual: true
3737
github:
3838
identifier: sbdchd/codeowners
39+
40+
test:
41+
environment:
42+
contents:
43+
packages:
44+
- busybox
45+
pipeline:
46+
- runs: |
47+
LIBRARY="codeowners"
48+
IMPORT_STATEMENT="from codeowners import CodeOwners"
49+
50+
if ! python -c "$IMPORT_STATEMENT"; then
51+
echo "Failed to import library '$LIBRARY'."
52+
python -c "$IMPORT_STATEMENT" 2>&1
53+
exit 1
54+
else
55+
echo "Library '$LIBRARY' is installed and can be imported successfully."
56+
exit 0
57+
fi

py3-codespell.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package:
22
name: py3-codespell
33
version: 2.2.6
44
epoch: 0
5-
description: "checker for common misspellings "
5+
description: 'checker for common misspellings '
66
copyright:
77
- license: GPL-2.0-or-later
88

py3-colorama.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package:
22
name: py3-colorama
33
version: 0.4.6
44
epoch: 3
5-
description: "Simple cross-platform colored terminal text"
5+
description: Simple cross-platform colored terminal text
66
copyright:
77
- license: BSD-3-Clause
88
dependencies:
@@ -49,3 +49,22 @@ update:
4949
github:
5050
identifier: tartley/colorama
5151
use-tag: true
52+
53+
test:
54+
environment:
55+
contents:
56+
packages:
57+
- busybox
58+
pipeline:
59+
- runs: |
60+
LIBRARY="colorama"
61+
IMPORT_STATEMENT="import colorama"
62+
63+
if ! python -c "$IMPORT_STATEMENT"; then
64+
echo "Failed to import library '$LIBRARY'."
65+
python -c "$IMPORT_STATEMENT" 2>&1
66+
exit 1
67+
else
68+
echo "Library '$LIBRARY' is installed and can be imported successfully."
69+
exit 0
70+
fi

py3-colorlog.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,22 @@ update:
4040
github:
4141
identifier: borntyping/python-colorlog
4242
strip-prefix: v
43+
44+
test:
45+
environment:
46+
contents:
47+
packages:
48+
- busybox
49+
pipeline:
50+
- runs: |
51+
LIBRARY="colorlog"
52+
IMPORT_STATEMENT="import colorlog"
53+
54+
if ! python -c "$IMPORT_STATEMENT"; then
55+
echo "Failed to import library '$LIBRARY'."
56+
python -c "$IMPORT_STATEMENT" 2>&1
57+
exit 1
58+
else
59+
echo "Library '$LIBRARY' is installed and can be imported successfully."
60+
exit 0
61+
fi

py3-configobj.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package:
55
epoch: 1
66
description: Config file reading, writing and validation.
77
copyright:
8-
- license: BSD (2 clause)
8+
- license: BSD-2-Clause
99
dependencies:
1010
runtime:
1111
- py3-six
@@ -42,3 +42,22 @@ update:
4242
identifier: DiffSK/configobj
4343
strip-prefix: v
4444
use-tag: true
45+
46+
test:
47+
environment:
48+
contents:
49+
packages:
50+
- busybox
51+
pipeline:
52+
- runs: |
53+
LIBRARY="configobj"
54+
IMPORT_STATEMENT="from configobj import ConfigObj"
55+
56+
if ! python -c "$IMPORT_STATEMENT"; then
57+
echo "Failed to import library '$LIBRARY'."
58+
python -c "$IMPORT_STATEMENT" 2>&1
59+
exit 1
60+
else
61+
echo "Library '$LIBRARY' is installed and can be imported successfully."
62+
exit 0
63+
fi

py3-contextlib2.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package:
22
name: py3-contextlib2
33
version: 21.6.0
44
epoch: 4
5-
description: "backports of the contextlib module from newer versions of python"
5+
description: backports of the contextlib module from newer versions of python
66
copyright:
77
- license: PSF-2.0 AND Apache-2.0
88
dependencies:
@@ -37,3 +37,22 @@ update:
3737
enabled: true
3838
release-monitor:
3939
identifier: 6215
40+
41+
test:
42+
environment:
43+
contents:
44+
packages:
45+
- busybox
46+
pipeline:
47+
- runs: |
48+
LIBRARY="contextlib2"
49+
IMPORT_STATEMENT="import contextlib2"
50+
51+
if ! python -c "$IMPORT_STATEMENT"; then
52+
echo "Failed to import library '$LIBRARY'."
53+
python -c "$IMPORT_STATEMENT" 2>&1
54+
exit 1
55+
else
56+
echo "Library '$LIBRARY' is installed and can be imported successfully."
57+
exit 0
58+
fi

py3-contourpy.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,22 @@ update:
4646
github:
4747
identifier: contourpy/contourpy
4848
strip-prefix: v
49+
50+
test:
51+
environment:
52+
contents:
53+
packages:
54+
- busybox
55+
pipeline:
56+
- runs: |
57+
LIBRARY="contourpy"
58+
IMPORT_STATEMENT="import contourpy"
59+
60+
if ! python -c "$IMPORT_STATEMENT"; then
61+
echo "Failed to import library '$LIBRARY'."
62+
python -c "$IMPORT_STATEMENT" 2>&1
63+
exit 1
64+
else
65+
echo "Library '$LIBRARY' is installed and can be imported successfully."
66+
exit 0
67+
fi

0 commit comments

Comments
 (0)