File: unittests3

package info (click to toggle)
pandas 1.1.5%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 47,284 kB
  • sloc: python: 292,793; ansic: 8,591; sh: 608; makefile: 94
file content (29 lines) | stat: -rwxr-xr-x 975 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
#!/bin/bash
set -eu
set -x

arch=$(dpkg --print-architecture)
pys="$(py3versions -r 2>/dev/null)"
sourcetestroot="$PWD/pandas/tests"

# Debian: Enable "slow" tests on x86 to keep the code coverage.
# Ubuntu: Disable "slow" tests on ALL architectures.
if (echo amd64 i386 | grep $arch >/dev/null) && [ "Debian" = $(dpkg-vendor --query vendor) ]; then
	marker=''
else
	marker='not slow'
fi

cd "$AUTOPKGTEST_TMP"
# Run in sections to avoid out-of-memory crash (#943732)
# exit code 5 means no tests in this file
TEST_SUCCESS=true
for py in $pys; do
	echo "=== $py ==="
	modpath=$($py -c 'import pandas as pd; print(pd.__path__[0])')
	for TEST_SUBSET in $modpath/tests/* ; do
        LC_ALL=C.UTF-8 xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" \
        $py -m pytest --tb=long -s -v -m "$marker" --deb-data-root-dir=$sourcetestroot --strict-data-files --confcutdir=$modpath $TEST_SUBSET 2>&1 || test $? == 5 || TEST_SUCCESS=false
    done
done
$TEST_SUCCESS