[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Failing event.set_blocked() test
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Failing event.set_blocked() test
- From: "René Dudfield" <renesd@xxxxxxxxx>
- Date: Tue, 5 Aug 2008 15:01:57 +1000
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Tue, 05 Aug 2008 01:02:02 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=RW8CCACVcKPf7xo1mdbGlLgdI+m5iPWShtye8kvEfy4=; b=HGw49wcSBgoh6mtN/eNXg/xSynbuoa/84k32wVFpk8Zp6nKibvsIhG8P1fzkvkcTWD OX7ATTkbhjMYmSkX7ctGCyoQ4Y1J9BmPPwSxy6ZZlZiXuYloKCsd4GQbL9fmIumhZZZJ KLVVEHdhU1IQr96wh2jXMPSlNOZh92qF+UgNI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=r3o5Qk1uuivGP0iSt4bWO9dFXPsrk8zF8Js3vkSSoRKmPtepddk6i7ecj1ePt9MdKZ rAUOxn4BJKXOtmu/a3zlBuf6CouIBCKueW6dqOdIecesTEG1jXTWSJBqCAJOhd949yzX IgTC+8KIKdaTMnxvnpPu3QnbP1iPzf2EUMwS4=
- In-reply-to: <cf6355060807302150m69843384q65d107061105b915@xxxxxxxxxxxxxx>
- References: <cf6355060807302150m69843384q65d107061105b915@xxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
this bug should be fixed in:
Committed revision 1562.
cu
On Thu, Jul 31, 2008 at 2:50 PM, Nicholas Dudfield <ndudfield@xxxxxxxxx> wrote:
> As can be seen on the handy build page
> (http://thorbrian.com/pygame/builds.php), we have a failing test at the
> moment.
>
> event_test.py:57 last rev: 1539:akalias
> FAIL: EventModuleTest.test_set_blocked
>
> The test is called test_set_blocked, testing pygame.event.set_blocked()
> though the issue may be with event.post() bypassing the set_blocked
> mechanism.
>
> def test_set_blocked(self):
> # __doc__ (as of 2008-06-25) for pygame.event.set_blocked:
>
> # pygame.event.set_blocked(type): return None
> # pygame.event.set_blocked(typelist): return None
> # pygame.event.set_blocked(None): return None
> # control which events are allowed on the queue
>
> pygame.event.set_blocked(2)
>
> self.assert_(pygame.event.get_blocked(2))
>
> pygame.event.post(pygame.event.Event(2))
>
> events = pygame.event.get()
> should_be_blocked = [e for e in events if e.type == 2]
>
> self.assertEquals(should_be_blocked, [])
>
> There is a setUp function that flushes the event queue before each test and
> while there is a race condition(OS events) the chances are small it will be
> an issue. It is unlikely to cause failure in the consistent fashion that
> repeated runs of my own, and all build page, machines are showing.
>