Skip to content

Commit

Permalink
توحيد الاختبارات في دالة متفردة
Browse files Browse the repository at this point in the history
  • Loading branch information
vzool committed Dec 10, 2024
1 parent 269beca commit c0ef686
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
22 changes: 2 additions & 20 deletions tests/test_00_zakat_tracker.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
from time import time_ns
from zakat import ZakatTracker, Helper, DictModel
import zakat


def test_zakat_tracker():
durations = {}
Helper.test(debug=True)
for model in [
DictModel(db_path="./zakat_test_db/zakat.camel"),
# SQLiteModel(db_path="./zakat_test_db/zakat.sqlite"),
]:
assert model.test(debug=True)
ledger = ZakatTracker(model=model)
start = time_ns()
assert ledger.test(debug=True)
durations[model.__class__.__name__] = time_ns() - start
print("#########################")
print("######## TEST DONE ########")
print("#########################")
for model_name, duration in durations.items():
print("------------- Model: [" + model_name + "] -------------")
print(Helper.duration_from_nanoseconds(duration))
print("#########################")
zakat.test(debug=True)
2 changes: 2 additions & 0 deletions zakat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
Helper,
Model,
DictModel,
SQLModel,
ZakatTracker,
test,
JSONEncoder,
Expand All @@ -34,6 +35,7 @@
"Helper",
"Model",
"DictModel",
"SQLModel",
"ZakatTracker",
"test",
"JSONEncoder",
Expand Down

0 comments on commit c0ef686

Please sign in to comment.