File tree Expand file tree Collapse file tree 2 files changed +33
-12
lines changed Expand file tree Collapse file tree 2 files changed +33
-12
lines changed Original file line number Diff line number Diff line change 19
19
print ('TextIOWrapper' in str (type (sys .stdout )))
20
20
print ('TextIOWrapper' in str (type (sys .stderr )))
21
21
print ('TextIOWrapper' in str (type (sys .stdin )))
22
-
23
- # # .buffer member is optional
24
- # try:
25
- # print('FileIO' in str(sys.stdout.buffer))
26
- # print('FileIO' in str(sys.stderr.buffer))
27
- # print('FileIO' in str(sys.stdin.buffer))
28
- #
29
- # print('FileIO' in str(type(sys.stdout.buffer)))
30
- # print('FileIO' in str(type(sys.stderr.buffer)))
31
- # print('FileIO' in str(type(sys.stdin.buffer)))
32
- # except AttributeError:
33
- # print("SKIP")
Original file line number Diff line number Diff line change
1
+ # Test sys.std* objects.
2
+
3
+ import sys
4
+
5
+ try :
6
+ sys .stdout
7
+ sys .stdin
8
+ sys .stderr
9
+ except AttributeError :
10
+ print ("SKIP" )
11
+ raise SystemExit
12
+
13
+ # CPython is more verbose; no need to match exactly
14
+
15
+ print ('TextIOWrapper' in str (sys .stdout ))
16
+ print ('TextIOWrapper' in str (sys .stderr ))
17
+ print ('TextIOWrapper' in str (sys .stdin ))
18
+
19
+ print ('TextIOWrapper' in str (type (sys .stdout )))
20
+ print ('TextIOWrapper' in str (type (sys .stderr )))
21
+ print ('TextIOWrapper' in str (type (sys .stdin )))
22
+
23
+ # # .buffer member is optional
24
+ # try:
25
+ # print('FileIO' in str(sys.stdout.buffer))
26
+ # print('FileIO' in str(sys.stderr.buffer))
27
+ # print('FileIO' in str(sys.stdin.buffer))
28
+ #
29
+ # print('FileIO' in str(type(sys.stdout.buffer)))
30
+ # print('FileIO' in str(type(sys.stderr.buffer)))
31
+ # print('FileIO' in str(type(sys.stdin.buffer)))
32
+ # except AttributeError:
33
+ # print("SKIP")
You can’t perform that action at this time.
0 commit comments