Skip to content

Commit 9661a60

Browse files
committed
tst-1
Signed-off-by: Sebastien Binet <binet@cern.ch>
1 parent 411955b commit 9661a60

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

stdlib/tempfile/testdata/test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,17 @@ def remove(fd, name):
7070
fd, tmp = tempfile.mkstemp()
7171
remove(fd, tmp)
7272
print("mkstemp() [OK]")
73+
except SystemError as e:
74+
print("could not create tmp dir w/ mkstemp(): %s" % e)
7375
except Exception as e:
7476
print("could not create tmp dir w/ mkstemp(): %s" % e)
7577

7678
try:
7779
fd, tmp = tempfile.mkstemp(prefix="prefix-", suffix="-suffix")
7880
remove(fd, tmp)
7981
print("mkstemp(prefix='prefix-', suffix='-suffix') [OK]")
82+
except SystemError as e:
83+
print("1 could not create tmp dir w/ mkstemp(): %s" % e)
8084
except Exception as e:
8185
print("could not create tmp dir w/ mkstemp(prefix='prefix-', suffix='-suffix'): %s" % e)
8286

@@ -86,6 +90,8 @@ def remove(fd, name):
8690
remove(fd, tmp)
8791
os.remove(top)
8892
print("mkstemp(prefix='prefix-', suffix='-suffix', dir=top) [OK]")
93+
except SystemError as e:
94+
print("2 could not create tmp dir w/ mkstemp(): %s" % e)
8995
except Exception as e:
9096
print("could not create tmp dir w/ mkstemp(prefix='prefix-', suffix='-suffix', dir=top): %s" % e)
9197

@@ -94,6 +100,8 @@ def remove(fd, name):
94100
fd, tmp = tempfile.mkstemp(prefix="prefix-", suffix="-suffix", dir=top)
95101
os.removedirs(top)
96102
print("mkstemp(prefix='prefix-', suffix='-suffix', dir=top) [OK]")
103+
except SystemError as e:
104+
print("3 could not create tmp dir w/ mkstemp(): %s" % e)
97105
except Exception as e:
98106
print("could not create tmp dir w/ mkstemp(prefix='prefix-', suffix='-suffix', dir=top): %s" % e)
99107

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy