forked from runtimeverification/python-semantics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestio2.py
More file actions
61 lines (59 loc) · 1.48 KB
/
Copy pathtestio2.py
File metadata and controls
61 lines (59 loc) · 1.48 KB
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
50
51
52
53
54
55
56
57
58
59
60
import _io
i = _io._IOBase()
i.close()
try:
i.fileno()
except _io.UnsupportedOperation:
try:
i.readline(1)
except AttributeError:
try:
i.readlines(0)
except ValueError:
try:
i.seek()
except _io.UnsupportedOperation:
try:
i.tell()
except _io.UnsupportedOperation:
try:
i.truncate()
except _io.UnsupportedOperation:
try:
i.writelines([])
except ValueError:
try:
i.write()
except AttributeError:
try:
i.read()
except AttributeError:
try:
i.readall()
except AttributeError:
try:
i.readinto()
except AttributeError:
try:
i.__next__()
except AttributeError:
try:
i.flush()
except ValueError:
try:
i.__enter__()
except ValueError:
try:
i.isatty()
except ValueError:
x = 5
assert x == 5
i = _io._IOBase()
try:
i.readlines()
except AttributeError:
try:
i.writelines(["5"])
except AttributeError:
x = 6
assert x == 6