Message412577
Right now there only a single test to ensure `priority` works correctly in `scheduler`: https://github.com/python/cpython/blob/fea7290a0ecee09bbce571d4d10f5881b7ea3485/Lib/test/test_sched.py#L90-L97
It looks like it is not enough. Why?
```
for priority in [1, 2, 3, 4, 5]:
z = scheduler.enterabs(0.01, priority, fun, (priority,))
scheduler.run()
self.assertEqual(l, [1, 2, 3, 4, 5])
```
This test does not actually test different priorities. It only tests that a direct one works correctly. But, this might be a pure coincidence that numbers match. They are spawned in this particular order.
What if there are equal numbers? Like `[1, 2, 1]`
I propose adding more examples to this test. PR is on its way. |
|
Date |
User |
Action |
Args |
2022-02-05 15:50:11 | sobolevn | set | recipients:
+ sobolevn |
2022-02-05 15:50:10 | sobolevn | set | messageid: <1644076210.74.0.445085597972.issue46650@roundup.psfhosted.org> |
2022-02-05 15:50:10 | sobolevn | link | issue46650 messages |
2022-02-05 15:50:10 | sobolevn | create | |
|