File: unittests3

package info (click to toggle)
pandas 0.23.3%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 167,704 kB
  • sloc: python: 230,826; ansic: 11,317; sh: 682; makefile: 133
file content (96 lines) | stat: -rwxr-xr-x 2,350 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/sh
set -efu
set -x

arch=$(dpkg --print-architecture)

# Let's filter some tests based on observations
kw2='test_spam_url'
kw3='test_spam_url'
if [ "amd64" = $arch ]; then
	kw2="$kw2
	test_register_by_default
	test_locale
	"
	kw3="$kw3
	test_memory_leak
	"
elif [ "arm64" = $arch ]; then
	kw2="$kw2
	test_value_counts_normalized
	test_resample_timedelta_values
	test_datetimelikes_nan
	test_sum_nanops_timedelta
	test_agg_dict_parameter_cast_result_dtypes
	test_timedelta_ops_with_missing_values
	test_register_by_default
	test_NaT_cast
	test_locale
	"
	kw3="$kw3
	test_value_counts_normalized
	test_resample_timedelta_values
	test_resample_datetime_values
	test_datetimelikes_nan
	test_sum_nanops_timedelta
	test_agg_dict_parameter_cast_result_dtypes
	test_timedelta_ops_with_missing_values
	test_memory_leak
	test_NaT_cast
	test_memory_leak
	"
elif [ "armhf" = $arch ]; then
	kw2="$kw2"
	kw3="$kw3"
elif [ "i386" = $arch ]; then
	kw2="$kw2"
	kw3="$kw3
	test_memory_leak
	"
elif [ "ppc64el" = $arch ]; then
	kw2="$kw2
	test_register_by_default
	test_locale
	"
	kw3="$kw3
	test_memory_leak
	"
elif [ "s390x" = $arch ]; then
	kw2="$kw2
	test_msgpacks_legacy
	test_locale
	"
	kw3="$kw3
	test_msgpacks_legacy
	"
else
	kw2="$kw2"
	kw3="$kw3"
fi

if (basename $0 | grep "3" >/dev/null); then
	keyword=$(python3 -c "print(' and '.join('not ' + x for x in '''$kw3'''.split()))")
	pys="$(py3versions -r 2>/dev/null)"
else
	keyword=$(python -c "print(' and '.join('not ' + x for x in '''$kw2'''.split()))")
	pys="$(pyversions -r 2>/dev/null)"
fi

# 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='not single and not network and not disabled'
elif (echo amd64 i386 | grep $arch >/dev/null) && [ "Ubuntu" = $(dpkg-vendor --query vendor) ]; then
	marker='not single and not network and not disabled and not slow'
else
	marker='not single and not network and not disabled and not intel and not slow'
fi

cd "$ADTTMP"

for py in $pys; do
	echo "=== $py ==="
	modpath=$($py -c 'import pandas as pd; print(pd.__path__[0])')
	LC_ALL=C.UTF-8 xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" \
		$py -m pytest --tb=long -s -v -m "$marker" -k "$keyword" $modpath 2>&1
done