Skip to content

Commit

Permalink
test: Add basic test
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnasism committed Mar 16, 2024
1 parent bf39f10 commit 0fccb7f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Empty file added tests/__init__.py
Empty file.
16 changes: 16 additions & 0 deletions tests/test_lib.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import time

from retry_later import retry_later


@retry_later()
def write_to_file(file_name: str, body: str):
with open(file_name, "w") as f:
f.write(body)


def test_success_once():
write_to_file("test.txt", "hello world")
time.sleep(5)
with open("test.txt") as f:
assert "hello world" in f.readlines()

0 comments on commit 0fccb7f

Please sign in to comment.