diff --git a/lang/python/python-bidict/Makefile b/lang/python/python-bidict/Makefile index 612ee26805..ac864064ff 100644 --- a/lang/python/python-bidict/Makefile +++ b/lang/python/python-bidict/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-bidict -PKG_VERSION:=0.22.1 +PKG_VERSION:=0.23.1 PKG_RELEASE:=1 PYPI_NAME:=bidict -PKG_HASH:=1e0f7f74e4860e6d0943a05d4134c63a2fad86f3d4732fb265bd79e4e856d81d +PKG_HASH:=03069d763bc387bbd20e7d49914e75fc4132a41937fa3405417e1a5a2d006d71 PKG_MAINTAINER:=Jan Pavlinec , Alexandru Ardelean PKG_LICENSE:=MPL-2.0 diff --git a/lang/python/python-bidict/test.sh b/lang/python/python-bidict/test.sh new file mode 100644 index 0000000000..3684614037 --- /dev/null +++ b/lang/python/python-bidict/test.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +[ "$1" = python3-bidict ] || exit 0 + +python3 - <<'EOF' +from bidict import bidict + +# Basic creation and lookup +b = bidict({'a': 1, 'b': 2, 'c': 3}) +assert b['a'] == 1 +assert b.inverse[1] == 'a' +assert b.inverse[2] == 'b' + +# Put and update +b['d'] = 4 +assert b['d'] == 4 +assert b.inverse[4] == 'd' + +# Delete +del b['d'] +assert 'd' not in b +assert 4 not in b.inverse + +# Inverse of inverse is the original +assert b.inverse.inverse is b + +# len +assert len(b) == 3 + +print("python-bidict OK") +EOF