projects
/
arvados.git
/ blob
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge branch 'master' into 4823-python-sdk-writable-collection-api
[arvados.git]
/
sdk
/
python
/
tests
/
test_util.py
1
import unittest
2
import os
3
import arvados.util
4
5
class MkdirDashPTest(unittest.TestCase):
6
def setUp(self):
7
try:
8
os.path.mkdir('./tmp')
9
except:
10
pass
11
def tearDown(self):
12
try:
13
os.unlink('./tmp/bar')
14
os.rmdir('./tmp/foo')
15
os.rmdir('./tmp')
16
except:
17
pass
18
def runTest(self):
19
arvados.util.mkdir_dash_p('./tmp/foo')
20
with open('./tmp/bar', 'wb') as f:
21
f.write('bar')
22
self.assertRaises(OSError, arvados.util.mkdir_dash_p, './tmp/bar')