◐ Shell
reader mode source ↗

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sobolevn
Recipients sobolevn
Date 2022-01-26.09:02:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643187723.6.0.226648372956.issue46530@roundup.psfhosted.org>
In-reply-to
Content
Right now here's how `test_get_clock_info` looks like:

```
def test_get_clock_info(self):
        clocks = ['monotonic', 'perf_counter', 'process_time', 'time']

        for name in clocks:
            info = time.get_clock_info(name)

            #self.assertIsInstance(info, dict)
            self.assertIsInstance(info.implementation, str)
            self.assertNotEqual(info.implementation, '')
            self.assertIsInstance(info.monotonic, bool)
            self.assertIsInstance(info.resolution, float)
            # 0.0 < resolution <= 1.0
            self.assertGreater(info.resolution, 0.0)
            self.assertLessEqual(info.resolution, 1.0)
            self.assertIsInstance(info.adjustable, bool)
```

It tests for out of five possible arguments to `time.get_clock_info`.
Docs: https://docs.python.org/3/library/time.html#time.get_clock_info
`'thread_time'` is missing for some reason.

I think we should add it to the test.

Link: https://github.com/python/cpython/blob/7cf285d82ec722d4225297366013e924805171f2/Lib/test/test_time.py#L559

PR is incoming.
History
Date User Action Args
2022-01-26 09:02:03sobolevnsetrecipients: + sobolevn
2022-01-26 09:02:03sobolevnsetmessageid: <1643187723.6.0.226648372956.issue46530@roundup.psfhosted.org>
2022-01-26 09:02:03sobolevnlinkissue46530 messages
2022-01-26 09:02:03sobolevncreate