BF: relax 1 sec delay testing to 100ms margin (Closes #1195)

pull/1196/head
Yaroslav Halchenko 2015-09-23 08:38:51 -04:00
parent 55e542b273
commit 17a4289798
1 changed files with 2 additions and 1 deletions

View File

@ -169,7 +169,8 @@ 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=1)
self.assertGreater(t1 - t0, 0.99) # shouldn't be faster than 1sec
self.assertGreater(1.1, t1 - t0)
def testDatabase(self):
tmp, tmpFilename = tempfile.mkstemp(".db", "fail2ban_")