Skip to content

Commit

Permalink
Add new tests directory
Browse files Browse the repository at this point in the history
Rename test_output.py to name what we're testing
  • Loading branch information
madig committed Jun 17, 2019
1 parent 33a12c2 commit 51bbef7
Show file tree
Hide file tree
Showing 32 changed files with 4,090 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from pathlib import Path

import pytest


@pytest.fixture
def data_dir():
return Path(__file__).parent / "data"
32 changes: 32 additions & 0 deletions tests/data/DesignspaceTest/DesignspaceTest.designspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version='1.0' encoding='UTF-8'?>
<designspace format="4.0">
<axes>
<axis tag="wght" name="weight" minimum="300" maximum="700" default="300">
<map input="300" output="50"/>
<map input="400" output="100"/>
<map input="700" output="150"/>
</axis>
</axes>
<sources>
<source filename="MyFont-Light.ufo" name="MyFont Light" familyname="MyFont" stylename="Light">
<info copy="1"/>
<location>
<dimension name="weight" xvalue="50"/>
</location>
</source>
<source filename="MyFont-Bold.ufo" name="MyFont Bold" familyname="MyFont" stylename="Bold">
<location>
<dimension name="weight" xvalue="150"/>
</location>
</source>
</sources>
<instances>
<instance familyname="MyFont" stylename="Regular" filename="MyFont-Regular.ufo">
<location>
<dimension name="weight" xvalue="100"/>
</location>
<kerning/>
<info/>
</instance>
</instances>
</designspace>
20 changes: 20 additions & 0 deletions tests/data/DesignspaceTest/MyFont-Bold.ufo/fontinfo.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ascender</key>
<integer>0</integer>
<key>capHeight</key>
<integer>0</integer>
<key>descender</key>
<integer>0</integer>
<key>familyName</key>
<string>MyFont</string>
<key>styleName</key>
<string>Bold</string>
<key>unitsPerEm</key>
<integer>1000</integer>
<key>xHeight</key>
<integer>0</integer>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>l</key>
<string>l.glif</string>
</dict>
</plist>
13 changes: 13 additions & 0 deletions tests/data/DesignspaceTest/MyFont-Bold.ufo/glyphs/l.glif
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="l" format="2">
<advance width="280"/>
<unicode hex="006C"/>
<outline>
<contour>
<point x="250" y="0" type="line"/>
<point x="250" y="750" type="line"/>
<point x="30" y="750" type="line"/>
<point x="30" y="0" type="line"/>
</contour>
</outline>
</glyph>
10 changes: 10 additions & 0 deletions tests/data/DesignspaceTest/MyFont-Bold.ufo/layercontents.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<array>
<string>public.default</string>
<string>glyphs</string>
</array>
</array>
</plist>
10 changes: 10 additions & 0 deletions tests/data/DesignspaceTest/MyFont-Bold.ufo/metainfo.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>creator</key>
<string>com.github.fonttools.ufoLib</string>
<key>formatVersion</key>
<integer>3</integer>
</dict>
</plist>
20 changes: 20 additions & 0 deletions tests/data/DesignspaceTest/MyFont-Light.ufo/fontinfo.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ascender</key>
<integer>0</integer>
<key>capHeight</key>
<integer>0</integer>
<key>descender</key>
<integer>0</integer>
<key>familyName</key>
<string>MyFont</string>
<key>styleName</key>
<string>Light</string>
<key>unitsPerEm</key>
<integer>1000</integer>
<key>xHeight</key>
<integer>0</integer>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>l</key>
<string>l.glif</string>
</dict>
</plist>
13 changes: 13 additions & 0 deletions tests/data/DesignspaceTest/MyFont-Light.ufo/glyphs/l.glif
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version='1.0' encoding='UTF-8'?>
<glyph name="l" format="2">
<advance width="160"/>
<unicode hex="006C"/>
<outline>
<contour>
<point x="90" y="0" type="line"/>
<point x="90" y="750" type="line"/>
<point x="70" y="750" type="line"/>
<point x="70" y="0" type="line"/>
</contour>
</outline>
</glyph>
10 changes: 10 additions & 0 deletions tests/data/DesignspaceTest/MyFont-Light.ufo/layercontents.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<array>
<string>public.default</string>
<string>glyphs</string>
</array>
</array>
</plist>
10 changes: 10 additions & 0 deletions tests/data/DesignspaceTest/MyFont-Light.ufo/metainfo.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>creator</key>
<string>com.github.fonttools.ufoLib</string>
<key>formatVersion</key>
<integer>3</integer>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ascender</key>
<integer>0</integer>
<key>capHeight</key>
<integer>0</integer>
<key>descender</key>
<integer>0</integer>
<key>familyName</key>
<string>Designspace Test</string>
<key>guidelines</key>
<array/>
<key>postscriptBlueValues</key>
<array/>
<key>postscriptFamilyBlues</key>
<array/>
<key>postscriptFamilyOtherBlues</key>
<array/>
<key>postscriptOtherBlues</key>
<array/>
<key>postscriptStemSnapH</key>
<array/>
<key>postscriptStemSnapV</key>
<array/>
<key>styleName</key>
<string>Light</string>
<key>unitsPerEm</key>
<integer>1000</integer>
<key>xHeight</key>
<integer>0</integer>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<array>
<string>public.default</string>
<string>glyphs</string>
</array>
</array>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>creator</key>
<string>com.github.fonttools.ufoLib</string>
<key>formatVersion</key>
<integer>3</integer>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include(family.fea)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ascender</key>
<integer>0</integer>
<key>capHeight</key>
<integer>0</integer>
<key>descender</key>
<integer>0</integer>
<key>familyName</key>
<string>Designspace Test</string>
<key>guidelines</key>
<array/>
<key>postscriptBlueValues</key>
<array/>
<key>postscriptFamilyBlues</key>
<array/>
<key>postscriptFamilyOtherBlues</key>
<array/>
<key>postscriptOtherBlues</key>
<array/>
<key>postscriptStemSnapH</key>
<array/>
<key>postscriptStemSnapV</key>
<array/>
<key>styleName</key>
<string>Regular</string>
<key>unitsPerEm</key>
<integer>1000</integer>
<key>xHeight</key>
<integer>0</integer>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<array>
<string>public.default</string>
<string>glyphs</string>
</array>
</array>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>creator</key>
<string>com.github.fonttools.ufoLib</string>
<key>formatVersion</key>
<integer>3</integer>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version='1.0' encoding='UTF-8'?>
<designspace format="4.0">
<axes>
<axis tag="wght" name="weight" minimum="100" maximum="400" default="400"/>
</axes>
<sources>
<source filename="DesignspaceTest-Light.ufo" name="Designspace Test Light" familyname="Designspace Test" stylename="Light">
<location>
<dimension name="weight" xvalue="100"/>
</location>
</source>
<source filename="DesignspaceTest-Regular.ufo" name="Designspace Test Regular" familyname="Designspace Test" stylename="Regular">
<lib copy="1"/>
<groups copy="1"/>
<features copy="1"/>
<info copy="1"/>
<location>
<dimension name="weight" xvalue="400"/>
</location>
</source>
</sources>
<instances>
<instance name="Designspace Test Light" familyname="Designspace Test" stylename="Light" filename="instance_ufo/DesignspaceTest-Light.ufo">
<location>
<dimension name="weight" xvalue="250"/>
</location>
<kerning/>
<info/>
</instance>
</instances>
</designspace>
1 change: 1 addition & 0 deletions tests/data/DesignspaceTestSharedFeatures/family.fea
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# test
Loading

0 comments on commit 51bbef7

Please sign in to comment.