designspace_test: test getSourcePath method prefers 'path' attribute when present

This commit is contained in:
Cosimo Lupo 2019-01-02 14:10:22 +00:00
parent 1470ef7258
commit 88eacd3804
No known key found for this signature in database
GPG Key ID: 59D54DB0C9976482

View File

@ -789,6 +789,11 @@ def test_documentLib(tmpdir):
def test_getSourcePath():
doc = DesignSpaceDocument()
s1 = SourceDescriptor()
s1.path = "/tmp/foo/masters/Source1.ufo"
assert doc.getSourcePath(s1) == s1.path
s1.path = None
with pytest.raises(
DesignSpaceDocumentError,