Skip to content

Commit 36c2af0

Browse files
committed
test for geturl
1 parent 737edcf commit 36c2af0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

fs/test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,12 @@ def test_geturl(self):
407407
else:
408408
self.assertTrue(self.fs.hasurl('foo'))
409409

410+
def test_geturl_purpose(self):
411+
"""Check an unknown purpose raises a NoURL error"""
412+
self.fs.create('foo')
413+
with self.assertRaises(errors.NoURL):
414+
self.fs.geturl('foo', purpose='__nosuchpurpose__')
415+
410416
def test_invalid_chars(self):
411417
# Test invalid path method.
412418
with self.assertRaises(errors.InvalidCharsInPath):

0 commit comments

Comments
 (0)