include $(TOPDIR)/rules.mk
PKG_NAME:=python-outcome
-PKG_VERSION:=1.2.0
-PKG_RELEASE:=2
+PKG_VERSION:=1.3.0
+PKG_RELEASE:=1
PYPI_NAME:=outcome
-PKG_HASH:=6f82bd3de45da303cf1f771ecafa1633750a358436a8bb60e06a1ceb745d2672
+PKG_HASH:=588ef4dc10b64e8df160d8d1310c44e1927129a66d6d2ef86845cef512c5f24c
PKG_LICENSE:=Apache-2.0 MIT
PKG_LICENSE_FILES:=LICENSE.APACHE2 LICENSE.MIT
--- /dev/null
+#!/bin/sh
+
+[ "$1" = python3-outcome ] || exit 0
+
+python3 - << 'EOF'
+from outcome import Value, Error, capture, acapture
+
+# Value outcome
+v = Value(42)
+assert v.value == 42
+assert v.unwrap() == 42
+
+# Error outcome
+e = Error(ValueError("oops"))
+assert isinstance(e.error, ValueError)
+try:
+ e.unwrap()
+ assert False, "Should have raised"
+except ValueError as exc:
+ assert str(exc) == "oops"
+
+# capture()
+result = capture(lambda: 1 + 1)
+assert isinstance(result, Value)
+assert result.value == 2
+
+result2 = capture(lambda: 1 / 0)
+assert isinstance(result2, Error)
+assert isinstance(result2.error, ZeroDivisionError)
+
+# acapture is present and callable (async test omitted: python3-asyncio not a dependency)
+assert callable(acapture)
+EOF