Skip to content

Commit

Permalink
إضافة هيكلة قاعدة البيانات
Browse files Browse the repository at this point in the history
  • Loading branch information
vzool committed Oct 1, 2024
1 parent f7f348f commit c459ad5
Show file tree
Hide file tree
Showing 3 changed files with 392 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ build
*.csv
*.pickle
*.camel
*.sqlite
tmp
*.json
*.pyc
Expand Down
22 changes: 12 additions & 10 deletions tests/test_zakat_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@


def test_zakat_tracker():
start = Helper.time()
os.chdir('tests')
ledger = ZakatTracker(
model=DictModel(
db_path='./zakat_test_db/test.camel',
history_mode=True,
),
)
ledger.test(True)
durations = {}
for model in [
DictModel(db_path="./zakat_test_db/zakat.camel", history_mode=True),
# SQLiteModel(db_path="./zakat_test_db/zakat.sqlite", history_mode=True),
]:
ledger = ZakatTracker(model=model)
start = Helper.time()
assert ledger.test(debug=True)
durations[model.__class__.__name__] = Helper.time() - start
print("#########################")
print("######## TEST DONE ########")
print("#########################")
print(Helper.duration_from_nanoseconds(Helper.time() - start))
for model_name, duration in durations.items():
print("------------- Model: [" + model_name + "] -------------")
print(Helper.duration_from_nanoseconds(duration))
print("#########################")
Loading

0 comments on commit c459ad5

Please sign in to comment.