[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant-frontend-examples] 02/02: Testcase pytaler.
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant-frontend-examples] 02/02: Testcase pytaler. |
Date: |
Mon, 20 Feb 2017 19:12:57 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant-frontend-examples.
commit 924a48725eb59e8a8331bf4efaee5b5c38efc48c
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Feb 20 19:12:18 2017 +0100
Testcase pytaler.
---
Python/Makefile | 3 +++
Python/pytaler/amounts.py | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/Python/Makefile b/Python/Makefile
index 368fff7..ec2ca0f 100644
--- a/Python/Makefile
+++ b/Python/Makefile
@@ -1,2 +1,5 @@
all:
pip3 install . --install-option="--prefix=$(TALER_PREFIX)"
+
+check:
+ python3 pytaler/tests.py
diff --git a/Python/pytaler/amounts.py b/Python/pytaler/amounts.py
index d39663f..ee7b0d1 100644
--- a/Python/pytaler/amounts.py
+++ b/Python/pytaler/amounts.py
@@ -28,6 +28,10 @@ def amount_sum(a1, a2):
"currency": a1["currency"]}
return ret
+# True if a1 == a2
+def same_amount(a1, a2):
+ return a1["value"] == a2["value"] and a1["fraction"] == a2["fraction"] and
a1["currency"] == a2["currency"]
+
# Computes a1 - a2
def amount_sub(a1, a2):
assert(a1["currency"] == a2["currency"])
--
To stop receiving notification emails like this one, please contact
address@hidden