File: entry-point-scripts

package info (click to toggle)
python-coverage 4.2%2Bdfsg.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,352 kB
  • ctags: 2,233
  • sloc: python: 16,048; ansic: 1,163; makefile: 184; sh: 162; xml: 42
file content (43 lines) | stat: -rw-r--r-- 998 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#! /bin/bash
#
# debian/tests/entry-point-scripts
# Part of Debian ‘python-coverage’ package.
#
# Copyright © 2016 Ben Finney <bignose@debian.org>
# This is free software; you may copy, modify, and/or distribute this work
# under the terms of the Expat license as published by James Clark.
# No warranty expressed or implied.
#
# Simple test for entry-point scripts.

set -o errexit
set -o errtrace
set -o nounset

COMMAND_TEMPLATE='python%s-coverage'

versions=(
        ''
        '3' '2'
        $(py3versions --version --supported)
        $(pyversions --version --supported)
)

test_input_path="$(mktemp -t --suffix=".py")"
cat > "$test_input_path" <<_EOF_
print("Hello, world!")
_EOF_

for ver in "${versions[@]}" ; do
    command="$(printf "$COMMAND_TEMPLATE" "$ver")"
    printf "Module script: ‘%s’\n" "$command"
    echo $command run "$test_input_path"
    printf "\n"
done


# Local variables:
# coding: utf-8
# mode: shell-script
# End:
# vim: fileencoding=utf-8 filetype=sh :