We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 63b9e59 commit a06c38bCopy full SHA for a06c38b
1 file changed
tests/io/open_append.py
@@ -0,0 +1,31 @@
1
+import sys
2
+try:
3
+ import _os as os
4
+except ImportError:
5
+ import os
6
+
7
+if not hasattr(os, "unlink"):
8
+ print("SKIP")
9
+ sys.exit()
10
11
12
+ os.unlink("testfile")
13
+except OSError:
14
+ pass
15
16
+# Should create a file
17
+f = open("testfile", "a")
18
+f.write("foo")
19
+f.close()
20
21
+f = open("testfile")
22
+print(f.read())
23
24
25
26
+f.write("bar")
27
28
29
30
31
0 commit comments