FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
gpython/stdlib/time/testdata/test.py at main · go-python/gpython · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
go-python
/
gpython
Public
Notifications
You must be signed in to change notification settings
Fork
105
Star
1k
Code
Issues
49
Pull requests
5
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
gpython
/
stdlib
/
time
/
testdata
/
test.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
49 lines (42 loc) · 1.13 KB
Breadcrumbs
gpython
/
stdlib
/
time
/
testdata
/
test.py
Copy path
File metadata and controls
49 lines (42 loc) · 1.13 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright 2022 The go-python Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import
time
now
=
time
.
time
()
now
=
time
.
time_ns
()
now
=
time
.
clock
()
def
notimplemented
(
fn
,
*
args
,
**
kwargs
):
try
:
fn
(
*
args
,
**
kwargs
)
print
(
"error for %s(%s, %s)"
%
(
fn
,
args
,
kwargs
))
except
NotImplementedError
:
pass
notimplemented
(
time
.
clock_gettime
)
notimplemented
(
time
.
clock_settime
)
print
(
"# sleep"
)
time
.
sleep
(
0.1
)
try
:
time
.
sleep
(
-
1
)
print
(
"no error sleep(-1)"
)
except
ValueError
as
e
:
print
(
"caught error: %s"
%
(
e
,))
pass
try
:
time
.
sleep
(
"1"
)
print
(
"no error sleep('1')"
)
except
TypeError
as
e
:
print
(
"caught error: %s"
%
(
e
,))
pass
notimplemented
(
time
.
gmtime
)
notimplemented
(
time
.
localtime
)
notimplemented
(
time
.
asctime
)
notimplemented
(
time
.
ctime
)
notimplemented
(
time
.
mktime
,
1
)
notimplemented
(
time
.
strftime
)
notimplemented
(
time
.
strptime
)
notimplemented
(
time
.
tzset
)
notimplemented
(
time
.
monotonic
)
notimplemented
(
time
.
process_time
)
notimplemented
(
time
.
perf_counter
)
notimplemented
(
time
.
get_clock_info
)
print
(
"OK"
)
Back
|
FazBrowse Home
|
New Git URL