コード例 #1
0
ファイル: test_util.py プロジェクト: wuub/prometheus_async
 def test_py3(self):
     """
     Use time.perf_counter on Python 3
     """
     assert (
         _util.get_time is
         time.perf_counter is
         _util.mk_get_time()
     )
コード例 #2
0
ファイル: test_util.py プロジェクト: wuub/prometheus_async
 def test_py2(self):
     """
     Use monotonic.time on Python 2
     """
     import monotonic
     assert (
         _util.get_time is
         monotonic.time is
         _util.mk_get_time()
     )
コード例 #3
0
 def test_py3(self):
     """
     Use time.perf_counter on Python 3
     """
     assert (_util.get_time is time.perf_counter is _util.mk_get_time())
コード例 #4
0
 def test_py2(self):
     """
     Use monotonic.time on Python 2
     """
     import monotonic
     assert (_util.get_time is monotonic.time is _util.mk_get_time())