Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test app.EVENT_LOOP is unstable #769

Open
GoogleCodeExporter opened this issue Apr 6, 2015 · 0 comments
Open

Test app.EVENT_LOOP is unstable #769

GoogleCodeExporter opened this issue Apr 6, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Run: python test.py app.EVENT_LOOP
2. Have several applications open during the test

What is the expected output? What do you see instead?
The test is expected to pass. However every now and then it fails:

 11 INFO Begin unit tests for app.EVENT_LOOP                                                            
 12 ERROR Failure in app.EVENT_LOOP                                                                     
 13 ERROR Traceback (most recent call last):                                                            
 14   File "../tests/app/EVENT_LOOP.py", line 54, in test_1_5                                           
 15     self.t_scheduled(1, 5, 0)                                                                       
 16   File "../tests/app/EVENT_LOOP.py", line 48, in t_scheduled                                        
 17     pyglet.app.run()                                                                                
 18   File "../pyglet/app/__init__.py", line 143, in run                                                
 19     event_loop.run()                                                                                
 20   File "../pyglet/app/base.py", line 136, in run                                                    
 21     self._run_estimated()                                                                           
 22   File "../pyglet/app/base.py", line 165, in _run_estimated                                         
 23     timeout = self.idle()                                                                           
 24   File "../pyglet/app/base.py", line 274, in idle                                                   
 25     redraw_all = self.clock.call_scheduled_functions(dt)                                            
 26   File "../pyglet/clock.py", line 309, in call_scheduled_functions                                  
 27     item.func(ts - item.last_ts, *item.args, **item.kwargs)                                         
 28   File "../tests/app/EVENT_LOOP.py", line 37, in f                                                  
 29     self.assertAlmostEqual(dt, interval, places=2)                                                  
 30 AssertionError: 1.0116348266601562 != 1 within 2 places

It seems it is very susceptible to performance changes.


Original issue reported on code.google.com by [email protected] on 25 Jan 2015 at 4:04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant