Skip to content

Commit

Permalink
إضافة اختبار لدوال خطوات التاريخ
Browse files Browse the repository at this point in the history
  • Loading branch information
vzool committed Oct 12, 2024
1 parent 3bf419a commit 8ca8758
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions zakat/zakat_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3583,6 +3583,20 @@ def _test_core(self, restore=False, debug=False):

self.db.reset()

# lock
assert self.db.nolock()
lock1 = self.db.lock()
if debug:
print(f'lock1 = {lock1}')
assert lock1 != 0
lock2 = self.db.lock()
if debug:
print(f'lock2 = {lock2}')
assert lock1 == lock2
assert not self.db.nolock()
assert self.db.free(lock1)
assert not self.db.free(lock1)

table = {
102: [
(0, 10, 1000, 1000, 1000, 1, 1),
Expand Down

0 comments on commit 8ca8758

Please sign in to comment.