Found an error in a test and a couple of typos in the code.
git-svn-id: http://svn.robofab.com/branches/ufo3k@508 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
This commit is contained in:
parent
ff01e27763
commit
6f7a70d13f
@ -207,7 +207,7 @@ class UFOReader(object):
|
||||
return None
|
||||
if os.path.isdir(fullPath):
|
||||
raise UFOLibError("%s is a directory." % path)
|
||||
f = codecs.open(path, READ_MODE, encoding=encoding)
|
||||
f = codecs.open(fullPath, READ_MODE, encoding=encoding)
|
||||
return f
|
||||
|
||||
def getFileModificationTime(self, path):
|
||||
@ -727,7 +727,7 @@ class UFOWriter(object):
|
||||
if os.path.exists(fullPath) and os.path.isdir(fullPath):
|
||||
raise UFOLibError("A directory exists at %s." % path)
|
||||
self._buildDirectoryTree(path)
|
||||
return codecs.open(path, WRITE_MODE, encoding=encoding)
|
||||
return codecs.open(fullPath, WRITE_MODE, encoding=encoding)
|
||||
|
||||
def removeFileForPath(self, path):
|
||||
"""
|
||||
|
@ -4111,9 +4111,9 @@ class UFO3ReadDataTestCase(unittest.TestCase):
|
||||
found = [path for path in found if ".svn" not in path]
|
||||
found = list(sorted(found))
|
||||
expected = [
|
||||
'data/org.unifiedfontobject.directory/bar/lol.txt',
|
||||
'data/org.unifiedfontobject.directory/foo.txt',
|
||||
'data/org.unifiedfontobject.file.txt'
|
||||
'org.unifiedfontobject.directory/bar/lol.txt',
|
||||
'org.unifiedfontobject.directory/foo.txt',
|
||||
'org.unifiedfontobject.file.txt'
|
||||
]
|
||||
expected = list(sorted(expected))
|
||||
self.assertEqual(found, expected)
|
||||
|
Loading…
x
Reference in New Issue
Block a user