Files
packages/lang/python/python-chardet/test.sh
Alexandru Ardelean 6e014ede19 python-chardet: bump to 7.0.1
Full release notes:
https://github.com/chardet/chardet/releases/tag/7.0.1

Add 'python3-codecs' as dependency. No idea when (or if) this was
ever needed, but it became obvious after test.sh was added.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
2026-03-14 10:22:59 +02:00

14 lines
270 B
Bash

#!/bin/sh
[ "$1" = python3-chardet ] || exit 0
python3 - << 'EOF'
import chardet
result = chardet.detect(b'Hello, World!')
assert result['encoding'] is not None
result = chardet.detect('Привет мир'.encode('utf-8'))
assert result['encoding'] is not None
EOF