From d70b058abd63e2b116cade9d0c1949fb86b3ae83 Mon Sep 17 00:00:00 2001 From: Abdelaziz Elrashed Date: Thu, 11 Jul 2024 21:44:11 +0300 Subject: [PATCH] =?UTF-8?q?=D8=AD=D9=81=D8=B8=20=D8=A7=D9=84=D8=B9=D9=85?= =?UTF-8?q?=D9=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zakat/zakat_tracker.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/zakat/zakat_tracker.py b/zakat/zakat_tracker.py index 2769ea1..40057b8 100644 --- a/zakat/zakat_tracker.py +++ b/zakat/zakat_tracker.py @@ -2256,7 +2256,9 @@ def test(self, debug: bool = False) -> bool: suite.append(cp) if debug: print('suite', len(suite)) + # vault = self._vault.copy() for case in suite: + # self._vault = vault.copy() if debug: print('case', case) result = self.check_payment_parts(case) @@ -2264,11 +2266,15 @@ def test(self, debug: bool = False) -> bool: print('check_payment_parts', result, f'exceed: {exceed}') assert result == 0 - report = self.check(2.17, None, debug) - (valid, brief, plan) = report - if debug: - print('valid', valid) - assert self.zakat(report, parts=suite, debug=debug) + report = self.check(2.17, None, debug) + (valid, brief, plan) = report + if debug: + print('valid', valid) + zakat_result = self.zakat(report, parts=case, debug=debug) + if debug: + print('zakat-result', zakat_result) + assert valid == zakat_result + assert self.save(path + '.pickle') assert self.export_json(path + '.json')