Your message dated Sat, 18 Feb 2017 08:06:00 +0000
with message-id <[email protected]>
and subject line Re: Bug#855429: unblock: python-irc/8.5.3+dfsg-4
has caused the Debian Bug report #855429,
regarding unblock: python-irc/8.5.3+dfsg-4
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
855429: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855429
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: [email protected]
Usertags: unblock
Please unblock package python-irc.
Version “8.5.3+dfsg-4” resolves bug#854539 by patching some unit tests.
unblock python-irc/8.5.3+dfsg-4
--
\ “Nothing exists except atoms and empty space; everything else |
`\ is opinion.” —Democritus |
_o__) |
Ben Finney <[email protected]>
diff -Nru python-irc-8.5.3+dfsg/debian/changelog
python-irc-8.5.3+dfsg/debian/changelog
--- python-irc-8.5.3+dfsg/debian/changelog 2016-12-29 08:41:09.000000000
+1100
+++ python-irc-8.5.3+dfsg/debian/changelog 2017-02-18 06:48:31.000000000
+1100
@@ -1,3 +1,11 @@
+python-irc (8.5.3+dfsg-4) unstable; urgency=medium
+
+ * The “Faisal Arefin Dipan” release.
+ * Patch the unit tests to use a fake system clock.
+ Closes: bug#854539.
+
+ -- Ben Finney <[email protected]> Sat, 18 Feb 2017 06:48:31 +1100
+
python-irc (8.5.3+dfsg-3) unstable; urgency=medium
* The “Mukto-Mona” release.
diff -Nru python-irc-8.5.3+dfsg/debian/patches/02-fake-clock-for-tests.patch
python-irc-8.5.3+dfsg/debian/patches/02-fake-clock-for-tests.patch
--- python-irc-8.5.3+dfsg/debian/patches/02-fake-clock-for-tests.patch
1970-01-01 10:00:00.000000000 +1000
+++ python-irc-8.5.3+dfsg/debian/patches/02-fake-clock-for-tests.patch
2017-02-18 06:48:31.000000000 +1100
@@ -0,0 +1,57 @@
+Description: Use a fake system clock for unit tests.
+ .
+ This removes a non-deterministic dependency on the real system clock.
+Bug-Debian: http://bugs.debian.org/854539
+Author: Ben Finney <[email protected]>
+Last-Update: 2017-02-18
+
+
+diff --git i/irc/tests/test_client.py w/irc/tests/test_client.py
+index 1e2a8ddb..fd6fb9bf 100644
+--- i/irc/tests/test_client.py
++++ w/irc/tests/test_client.py
+@@ -44,6 +44,44 @@ class TestHandlers(object):
+ assert not handler1 < handler2
+ assert not handler2 < handler1
+
++
++class FakeClock(object):
++ """ A fake clock that is under control of test cases. """
++
++ _default_initial_seconds = 1450000000.0
++ _default_tick_duration = 0.0005
++
++ def __init__(
++ self,
++ seconds=_default_initial_seconds,
++ tick_duration=_default_tick_duration,
++ ):
++ self._tick_duration = tick_duration
++ self.reset(seconds)
++
++ def reset(self, seconds):
++ """ Reset the clock time to `seconds`. """
++ self._seconds = seconds
++
++ def advance(self, seconds):
++ """ Advance the clock by `seconds`. """
++ self._seconds += max(0, seconds)
++
++ def tick(self):
++ """ Advance the clock by its tick duration. """
++ self.advance(self._tick_duration)
++
++ def time(self):
++ """ Get the current time, as seconds since epoch. """
++ self.tick()
++ return self._seconds
++
++
++fake_clock = FakeClock()
++
++
[email protected](time, 'time', new=fake_clock.time)
[email protected](time, 'sleep', new=fake_clock.advance)
+ class TestThrottler(object):
+ def test_function_throttled(self):
+ """
diff -Nru python-irc-8.5.3+dfsg/debian/patches/series
python-irc-8.5.3+dfsg/debian/patches/series
--- python-irc-8.5.3+dfsg/debian/patches/series 2016-12-29 08:41:09.000000000
+1100
+++ python-irc-8.5.3+dfsg/debian/patches/series 2017-02-18 06:48:31.000000000
+1100
@@ -1 +1,2 @@
01-setup.patch
+02-fake-clock-for-tests.patch
signature.asc
Description: PGP signature
--- End Message ---
--- Begin Message ---
Ben Finney:
> Package: release.debian.org
> Severity: normal
> User: [email protected]
> Usertags: unblock
>
> Please unblock package python-irc.
>
> Version “8.5.3+dfsg-4” resolves bug#854539 by patching some unit tests.
>
> unblock python-irc/8.5.3+dfsg-4
>
Unblocked, thanks.
~Niels
--- End Message ---