Skip to content

Commit

Permalink
عرض مخرجات الاختبارات البرمجية
Browse files Browse the repository at this point in the history
  • Loading branch information
vzool committed Jun 23, 2024
1 parent a2802d2 commit a405800
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
pip install pytest-runner==6.0.1
- name: Test with pytest
run: |
pytest
pytest --capture=no
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ deps:
pip install pytest==8.2.2
pip install pytest-runner==6.0.1

.PHONY: test
# run tests
test:
pytest --capture=no

# show help
help:
@echo ''
Expand Down
1 change: 1 addition & 0 deletions README.ar.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<div dir="rtl">

# متتبع الزكاة (ZakatTracker): مكتبة بايثون لإدارة الزكاة الإسلامية
###### [تحت التطوير النشط]
</div>

<p>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![Zakat Tracker Logo](images/logo.jpg)

# ZakatTracker: A Python Library for Islamic Financial Management

###### [UNDER ACTIVE DEVELOPMENT]
<p>
<a href="https://github.com/vzool/zakat/blob/main/README.ar.md"><img src="https://img.shields.io/badge/lang-ar-green.svg" alt="ar" data-canonical-src="https://img.shields.io/badge/lang-en-green.svg" style="max-width: 100%;"></a>
</p>
Expand Down
13 changes: 10 additions & 3 deletions tests/test_zakat_tracker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import pytest
import os
from zakat import ZakatTracker

def test_zakat_tracker():
ledger = ZakatTracker("test.pickle")
ledger.test(True)
start = ZakatTracker.time()
os.chdir('tests')
ledger = ZakatTracker('test.pickle')
ledger.test(True)
print("#########################")
print("######## TEST DONE ########")
print("#########################")
print(ZakatTracker.DurationFromNanoSeconds(ZakatTracker.time()-start))
print("#########################")
2 changes: 1 addition & 1 deletion zakat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
)

# Version information for the module
__version__ = ZakatTracker.__version__
__version__ = ZakatTracker.Version()
__all__ = [
"ZakatTracker",
"Action",
Expand Down
2 changes: 1 addition & 1 deletion zakat/zakat_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class ZakatTracker:
ZakatCut = lambda x: 0.025*x # Zakat Cut in one Lunar Year
TimeCycle = lambda : int(60*60*24*354.367056*1e9) # Lunar Year in nanoseconds
Nisab = lambda x: 585*x # Silver Price in Local currency value
__version__ = 'v0.1.1719'
Version = lambda : '0.1.1720'

def __init__(self, db_path: str = "zakat.pickle", history_mode: bool = True):
"""
Expand Down

0 comments on commit a405800

Please sign in to comment.