[issue8687] sched.py module doesn't have a test suite
Giampaolo Rodola' g.rod...@gmail.com added the comment: Committed as r83707 without including the mock time tests for now. I'll see whether I can manage to write them at a later time. -- resolution: - fixed status: open - closed versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8687] sched.py module doesn't have a test suite
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- assignee: - giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8687] sched.py module doesn't have a test suite
Antoine Pitrou pit...@free.fr added the comment: You know, one benefit of having user-settable sleep() and time() functions is that you can mock them easily, and therefore check that sched.py really schedules callables at the right intervals. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8687] sched.py module doesn't have a test suite
Giampaolo Rodola' g.rod...@gmail.com added the comment: I agree. Are you recommending to take advantage of this and change the tests in some way? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8687] sched.py module doesn't have a test suite
Antoine Pitrou pit...@free.fr added the comment: I agree. Are you recommending to take advantage of this and change the tests in some way? Yes, it would allow you to check that if you have e.g. : - A scheduled in 1 s - B scheduled in 3 s sched.py first sleeps for 1 s, then calls A, then sleeps for 2 s, then calls B Twisted has a full-blown utility class that they use in many tests, allowing them to mock time.time(): http://twistedmatrix.com/documents/10.0.0/api/twisted.internet.task.Clock.html You probably don't need something as sophisticated, the idea of a class with advance() and time() methods is probably enough. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8687] sched.py module doesn't have a test suite
New submission from Giampaolo Rodola' g.rod...@gmail.com: sched.py module is currently lacking a test suite. Possibly this should be resolved before fixing issue 8684. -- components: Tests messages: 105503 nosy: giampaolo.rodola, josiah.carlson, josiahcarlson, pitrou priority: normal severity: normal status: open title: sched.py module doesn't have a test suite versions: Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8687] sched.py module doesn't have a test suite
Giampaolo Rodola' g.rod...@gmail.com added the comment: Patch in attachment. -- keywords: +patch Added file: http://bugs.python.org/file17296/test_sched.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com