Debian Codegraph @

debian/tests/python3-import

raw symbols SCIP
1 #!/bin/sh
2
3 set -e
4
5 # python3.Y at build time, python3 at CI time
6 PYINTERPRETER=${PYINTERPRETER:-python3}
7
8 # Python module successfully imported
9 ${PYINTERPRETER} -c 'import keras_preprocessing'
10
11 # Exercise one function of the library
12 ${PYINTERPRETER} -c 'import numpy as np
13 from keras_preprocessing import text
14 encoded = text.one_hot("The cat sat on the mat.", 5)
15 assert len(encoded) == 6
16 assert np.max(encoded) <= 4
17 assert np.min(encoded) >= 1
18 '