Skip to content

Commit

Permalink
[mb tests] to ignore expected uncertainty
Browse files Browse the repository at this point in the history
- just Unittest Orient Programming.
  • Loading branch information
NyaCl committed Dec 17, 2024
1 parent fdf35fe commit d93cd16
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ async def test_call_later(self) -> None:
begin = aio.get_event_loop().time()
await aio.sleep(5)
end = self.timestamps[0]
assert isclose(end - begin, 5.01, abs_tol=0.01)
assert isclose(end - begin, 5.01, abs_tol=0.011)

# may not meaningful, just refer `test_call_later` is also OK.
async def test_call_at(self) -> None:
Expand All @@ -270,7 +270,7 @@ async def test_async_later(self) -> None:
begin = aio.get_event_loop().time()
await async_later(self.afoo(), 5)
end = self.timestamps[0]
assert isclose(end - begin, 5.01, abs_tol=0.01)
assert isclose(end - begin, 5.01, abs_tol=0.011)

# just refer `test_async_later`.
async def test_async_at(self) -> None:
Expand All @@ -288,8 +288,8 @@ async def test_async_interval(self) -> None:
while i < len(self.timestamps):
assert isclose(
self.timestamps[i] - self.timestamps[i - 1],
1.01,
abs_tol=0.01
1.0,
abs_tol=0.011
)
i += 1
assert t.done()

0 comments on commit d93cd16

Please sign in to comment.