[designspace] Test for empty elements
This commit is contained in:
parent
3dc8e4fa95
commit
a1c6bc46f1
8
Tests/varLib/data/VarLibTest2.designspace
Normal file
8
Tests/varLib/data/VarLibTest2.designspace
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<designspace format="3">
|
||||
<!-- no <axes> element -->
|
||||
<sources/><!-- empty <sources> element -->
|
||||
<instances>
|
||||
<instance/><!-- bare-bones <instance> element -->
|
||||
</instances>
|
||||
</designspace>
|
@ -52,6 +52,11 @@ class DesignspaceTest(unittest.TestCase):
|
||||
}
|
||||
)
|
||||
|
||||
def test_load2(self):
|
||||
self.assertEqual(
|
||||
designspace.load(_getpath("VarLibTest2.designspace")),
|
||||
{'instances': [{}], 'sources': []})
|
||||
|
||||
|
||||
def _getpath(testfile):
|
||||
path, _ = os.path.split(__file__)
|
||||
|
Loading…
x
Reference in New Issue
Block a user