mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-05-13 14:36:43 +00:00
ENH(TST): relax test of sleep to "1" places from "2"
The reason is that internally it does round, so even 1.005 then would not be equal to 1. Making it spaces==1 should be sufficient for up to 1.05 i.e. we would allow 50ms "drift"
This commit is contained in:
parent
d7087412bb
commit
5bafc61e48
1 changed files with 1 additions and 1 deletions
|
|
@ -160,7 +160,7 @@ class Transmitter(TransmitterBase):
|
|||
self.assertEqual(self.transm.proceed(["sleep", "1"]), (0, None))
|
||||
t1 = time.time()
|
||||
# Approx 1 second delay
|
||||
self.assertAlmostEqual(t1 - t0, 1, places=2)
|
||||
self.assertAlmostEqual(t1 - t0, 1, places=1)
|
||||
|
||||
def testAddJail(self):
|
||||
jail2 = "TestJail2"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue