From 3b9ced71e06310dd7320087d954ceb1ed85ae01c Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Mon, 17 Oct 2016 19:37:52 +0100 Subject: [PATCH] move all test data inside the inlined ufoLib/test modules, and install them Since the test suite is inlined, it makes sense to also have the test data installed alongside the test modules. So all the content of the two top-level folders Data and TestData is now placed inside Lib/ufoLib/test/testadata. The MANIFEST.in has been adjusted accordingly. The `install_package_data` in setup.py ensures the package data specified in the manifest is installed with the package. This way anyone who installs ufoLib (even the wheel from PyPI) can run the test suite with `pytest --pyargs ufoLib`. --- Lib/ufoLib/test/testSupport.py | 5 ++--- Lib/ufoLib/test/test_UFO3.py | 8 ++------ Lib/ufoLib/test/test_UFOConversion.py | 8 ++------ .../ufoLib/test/testdata}/DemoFont.ufo/fontinfo.plist | 0 .../ufoLib/test/testdata}/DemoFont.ufo/glyphs/A_.glif | 0 .../ufoLib/test/testdata}/DemoFont.ufo/glyphs/B_.glif | 0 .../ufoLib/test/testdata}/DemoFont.ufo/glyphs/F_.glif | 0 .../test/testdata}/DemoFont.ufo/glyphs/F__A__B_.glif | 0 .../ufoLib/test/testdata}/DemoFont.ufo/glyphs/G_.glif | 0 .../ufoLib/test/testdata}/DemoFont.ufo/glyphs/O_.glif | 0 .../ufoLib/test/testdata}/DemoFont.ufo/glyphs/R_.glif | 0 .../testdata}/DemoFont.ufo/glyphs/a#condensed_bold.glif | 0 .../testdata}/DemoFont.ufo/glyphs/a#condensed_light.glif | 0 .../test/testdata}/DemoFont.ufo/glyphs/a#wide_bold.glif | 0 .../test/testdata}/DemoFont.ufo/glyphs/a#wide_light.glif | 0 .../ufoLib/test/testdata}/DemoFont.ufo/glyphs/a.glif | 0 .../test/testdata}/DemoFont.ufo/glyphs/contents.plist | 0 .../test/testdata}/DemoFont.ufo/glyphs/testglyph1.glif | 0 .../DemoFont.ufo/glyphs/testglyph1.reversed.glif | 0 .../ufoLib/test/testdata}/DemoFont.ufo/metainfo.plist | 0 .../test/testdata}/TestFont1 (UFO1).ufo/fontinfo.plist | 0 .../test/testdata}/TestFont1 (UFO1).ufo/glyphs/A_.glif | 0 .../test/testdata}/TestFont1 (UFO1).ufo/glyphs/B_.glif | 0 .../testdata}/TestFont1 (UFO1).ufo/glyphs/contents.plist | 0 .../test/testdata}/TestFont1 (UFO1).ufo/groups.plist | 0 .../test/testdata}/TestFont1 (UFO1).ufo/kerning.plist | 0 .../ufoLib/test/testdata}/TestFont1 (UFO1).ufo/lib.plist | 0 .../test/testdata}/TestFont1 (UFO1).ufo/metainfo.plist | 0 .../test/testdata}/TestFont1 (UFO2).ufo/features.fea | 0 .../test/testdata}/TestFont1 (UFO2).ufo/fontinfo.plist | 0 .../test/testdata}/TestFont1 (UFO2).ufo/glyphs/A_.glif | 0 .../test/testdata}/TestFont1 (UFO2).ufo/glyphs/B_.glif | 0 .../testdata}/TestFont1 (UFO2).ufo/glyphs/contents.plist | 0 .../test/testdata}/TestFont1 (UFO2).ufo/groups.plist | 0 .../test/testdata}/TestFont1 (UFO2).ufo/kerning.plist | 0 .../ufoLib/test/testdata}/TestFont1 (UFO2).ufo/lib.plist | 0 .../test/testdata}/TestFont1 (UFO2).ufo/metainfo.plist | 0 .../data/org.unifiedfontobject.directory/bar/lol.txt | 0 .../data/org.unifiedfontobject.directory/foo.txt | 0 .../data/org.unifiedfontobject.file.txt | 0 .../test/testdata}/UFO3-Read Data.ufo/metainfo.plist | 0 MANIFEST.in | 3 +-- setup.py | 1 + tox.ini | 5 +++-- 44 files changed, 11 insertions(+), 19 deletions(-) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/fontinfo.plist (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/glyphs/A_.glif (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/glyphs/B_.glif (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/glyphs/F_.glif (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/glyphs/F__A__B_.glif (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/glyphs/G_.glif (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/glyphs/O_.glif (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/glyphs/R_.glif (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/glyphs/a#condensed_bold.glif (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/glyphs/a#condensed_light.glif (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/glyphs/a#wide_bold.glif (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/glyphs/a#wide_light.glif (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/glyphs/a.glif (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/glyphs/contents.plist (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/glyphs/testglyph1.glif (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/glyphs/testglyph1.reversed.glif (100%) rename {Data => Lib/ufoLib/test/testdata}/DemoFont.ufo/metainfo.plist (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO1).ufo/fontinfo.plist (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO1).ufo/glyphs/A_.glif (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO1).ufo/glyphs/B_.glif (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO1).ufo/glyphs/contents.plist (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO1).ufo/groups.plist (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO1).ufo/kerning.plist (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO1).ufo/lib.plist (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO1).ufo/metainfo.plist (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO2).ufo/features.fea (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO2).ufo/fontinfo.plist (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO2).ufo/glyphs/A_.glif (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO2).ufo/glyphs/B_.glif (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO2).ufo/glyphs/contents.plist (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO2).ufo/groups.plist (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO2).ufo/kerning.plist (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO2).ufo/lib.plist (100%) rename {TestData => Lib/ufoLib/test/testdata}/TestFont1 (UFO2).ufo/metainfo.plist (100%) rename {TestData => Lib/ufoLib/test/testdata}/UFO3-Read Data.ufo/data/org.unifiedfontobject.directory/bar/lol.txt (100%) rename {TestData => Lib/ufoLib/test/testdata}/UFO3-Read Data.ufo/data/org.unifiedfontobject.directory/foo.txt (100%) rename {TestData => Lib/ufoLib/test/testdata}/UFO3-Read Data.ufo/data/org.unifiedfontobject.file.txt (100%) rename {TestData => Lib/ufoLib/test/testdata}/UFO3-Read Data.ufo/metainfo.plist (100%) diff --git a/Lib/ufoLib/test/testSupport.py b/Lib/ufoLib/test/testSupport.py index bd364c8d6..2f02cd1e7 100755 --- a/Lib/ufoLib/test/testSupport.py +++ b/Lib/ufoLib/test/testSupport.py @@ -12,9 +12,8 @@ except NameError: def getDemoFontPath(): """Return the path to Data/DemoFont.ufo/.""" - import ufoLib - root = os.path.dirname(os.path.dirname(os.path.dirname(ufoLib.__file__))) - return os.path.join(root, "Data", "DemoFont.ufo") + testdata = os.path.join(os.path.dirname(__file__), "testdata") + return os.path.join(testdata, "DemoFont.ufo") def getDemoFontGlyphSetPath(): diff --git a/Lib/ufoLib/test/test_UFO3.py b/Lib/ufoLib/test/test_UFO3.py index 7a92c480b..8161e9cbe 100644 --- a/Lib/ufoLib/test/test_UFO3.py +++ b/Lib/ufoLib/test/test_UFO3.py @@ -4139,12 +4139,8 @@ class UFO3WriteLayersTestCase(unittest.TestCase): class UFO3ReadDataTestCase(unittest.TestCase): def getFontPath(self): - import ufoLib - path = os.path.dirname(ufoLib.__file__) - path = os.path.dirname(path) - path = os.path.dirname(path) - path = os.path.join(path, "TestData", "UFO3-Read Data.ufo") - return path + testdata = os.path.join(os.path.dirname(__file__), "testdata") + return os.path.join(testdata, "UFO3-Read Data.ufo") def testUFOReaderDataDirectoryListing(self): reader = UFOReader(self.getFontPath()) diff --git a/Lib/ufoLib/test/test_UFOConversion.py b/Lib/ufoLib/test/test_UFOConversion.py index 16e1de16d..cd7a36afe 100644 --- a/Lib/ufoLib/test/test_UFOConversion.py +++ b/Lib/ufoLib/test/test_UFOConversion.py @@ -30,12 +30,8 @@ class ConversionFunctionsTestCase(unittest.TestCase): shutil.rmtree(path) def getFontPath(self, fileName): - import ufoLib - path = os.path.dirname(ufoLib.__file__) - path = os.path.dirname(path) - path = os.path.dirname(path) - path = os.path.join(path, "TestData", fileName) - return path + testdata = os.path.join(os.path.dirname(__file__), "testdata") + return os.path.join(testdata, fileName) def compareFileStructures(self, path1, path2, expectedInfoData, testFeatures): # result diff --git a/Data/DemoFont.ufo/fontinfo.plist b/Lib/ufoLib/test/testdata/DemoFont.ufo/fontinfo.plist similarity index 100% rename from Data/DemoFont.ufo/fontinfo.plist rename to Lib/ufoLib/test/testdata/DemoFont.ufo/fontinfo.plist diff --git a/Data/DemoFont.ufo/glyphs/A_.glif b/Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/A_.glif similarity index 100% rename from Data/DemoFont.ufo/glyphs/A_.glif rename to Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/A_.glif diff --git a/Data/DemoFont.ufo/glyphs/B_.glif b/Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/B_.glif similarity index 100% rename from Data/DemoFont.ufo/glyphs/B_.glif rename to Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/B_.glif diff --git a/Data/DemoFont.ufo/glyphs/F_.glif b/Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/F_.glif similarity index 100% rename from Data/DemoFont.ufo/glyphs/F_.glif rename to Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/F_.glif diff --git a/Data/DemoFont.ufo/glyphs/F__A__B_.glif b/Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/F__A__B_.glif similarity index 100% rename from Data/DemoFont.ufo/glyphs/F__A__B_.glif rename to Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/F__A__B_.glif diff --git a/Data/DemoFont.ufo/glyphs/G_.glif b/Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/G_.glif similarity index 100% rename from Data/DemoFont.ufo/glyphs/G_.glif rename to Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/G_.glif diff --git a/Data/DemoFont.ufo/glyphs/O_.glif b/Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/O_.glif similarity index 100% rename from Data/DemoFont.ufo/glyphs/O_.glif rename to Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/O_.glif diff --git a/Data/DemoFont.ufo/glyphs/R_.glif b/Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/R_.glif similarity index 100% rename from Data/DemoFont.ufo/glyphs/R_.glif rename to Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/R_.glif diff --git a/Data/DemoFont.ufo/glyphs/a#condensed_bold.glif b/Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/a#condensed_bold.glif similarity index 100% rename from Data/DemoFont.ufo/glyphs/a#condensed_bold.glif rename to Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/a#condensed_bold.glif diff --git a/Data/DemoFont.ufo/glyphs/a#condensed_light.glif b/Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/a#condensed_light.glif similarity index 100% rename from Data/DemoFont.ufo/glyphs/a#condensed_light.glif rename to Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/a#condensed_light.glif diff --git a/Data/DemoFont.ufo/glyphs/a#wide_bold.glif b/Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/a#wide_bold.glif similarity index 100% rename from Data/DemoFont.ufo/glyphs/a#wide_bold.glif rename to Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/a#wide_bold.glif diff --git a/Data/DemoFont.ufo/glyphs/a#wide_light.glif b/Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/a#wide_light.glif similarity index 100% rename from Data/DemoFont.ufo/glyphs/a#wide_light.glif rename to Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/a#wide_light.glif diff --git a/Data/DemoFont.ufo/glyphs/a.glif b/Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/a.glif similarity index 100% rename from Data/DemoFont.ufo/glyphs/a.glif rename to Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/a.glif diff --git a/Data/DemoFont.ufo/glyphs/contents.plist b/Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/contents.plist similarity index 100% rename from Data/DemoFont.ufo/glyphs/contents.plist rename to Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/contents.plist diff --git a/Data/DemoFont.ufo/glyphs/testglyph1.glif b/Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/testglyph1.glif similarity index 100% rename from Data/DemoFont.ufo/glyphs/testglyph1.glif rename to Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/testglyph1.glif diff --git a/Data/DemoFont.ufo/glyphs/testglyph1.reversed.glif b/Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/testglyph1.reversed.glif similarity index 100% rename from Data/DemoFont.ufo/glyphs/testglyph1.reversed.glif rename to Lib/ufoLib/test/testdata/DemoFont.ufo/glyphs/testglyph1.reversed.glif diff --git a/Data/DemoFont.ufo/metainfo.plist b/Lib/ufoLib/test/testdata/DemoFont.ufo/metainfo.plist similarity index 100% rename from Data/DemoFont.ufo/metainfo.plist rename to Lib/ufoLib/test/testdata/DemoFont.ufo/metainfo.plist diff --git a/TestData/TestFont1 (UFO1).ufo/fontinfo.plist b/Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/fontinfo.plist similarity index 100% rename from TestData/TestFont1 (UFO1).ufo/fontinfo.plist rename to Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/fontinfo.plist diff --git a/TestData/TestFont1 (UFO1).ufo/glyphs/A_.glif b/Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/glyphs/A_.glif similarity index 100% rename from TestData/TestFont1 (UFO1).ufo/glyphs/A_.glif rename to Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/glyphs/A_.glif diff --git a/TestData/TestFont1 (UFO1).ufo/glyphs/B_.glif b/Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/glyphs/B_.glif similarity index 100% rename from TestData/TestFont1 (UFO1).ufo/glyphs/B_.glif rename to Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/glyphs/B_.glif diff --git a/TestData/TestFont1 (UFO1).ufo/glyphs/contents.plist b/Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/glyphs/contents.plist similarity index 100% rename from TestData/TestFont1 (UFO1).ufo/glyphs/contents.plist rename to Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/glyphs/contents.plist diff --git a/TestData/TestFont1 (UFO1).ufo/groups.plist b/Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/groups.plist similarity index 100% rename from TestData/TestFont1 (UFO1).ufo/groups.plist rename to Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/groups.plist diff --git a/TestData/TestFont1 (UFO1).ufo/kerning.plist b/Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/kerning.plist similarity index 100% rename from TestData/TestFont1 (UFO1).ufo/kerning.plist rename to Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/kerning.plist diff --git a/TestData/TestFont1 (UFO1).ufo/lib.plist b/Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/lib.plist similarity index 100% rename from TestData/TestFont1 (UFO1).ufo/lib.plist rename to Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/lib.plist diff --git a/TestData/TestFont1 (UFO1).ufo/metainfo.plist b/Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/metainfo.plist similarity index 100% rename from TestData/TestFont1 (UFO1).ufo/metainfo.plist rename to Lib/ufoLib/test/testdata/TestFont1 (UFO1).ufo/metainfo.plist diff --git a/TestData/TestFont1 (UFO2).ufo/features.fea b/Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/features.fea similarity index 100% rename from TestData/TestFont1 (UFO2).ufo/features.fea rename to Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/features.fea diff --git a/TestData/TestFont1 (UFO2).ufo/fontinfo.plist b/Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/fontinfo.plist similarity index 100% rename from TestData/TestFont1 (UFO2).ufo/fontinfo.plist rename to Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/fontinfo.plist diff --git a/TestData/TestFont1 (UFO2).ufo/glyphs/A_.glif b/Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/glyphs/A_.glif similarity index 100% rename from TestData/TestFont1 (UFO2).ufo/glyphs/A_.glif rename to Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/glyphs/A_.glif diff --git a/TestData/TestFont1 (UFO2).ufo/glyphs/B_.glif b/Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/glyphs/B_.glif similarity index 100% rename from TestData/TestFont1 (UFO2).ufo/glyphs/B_.glif rename to Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/glyphs/B_.glif diff --git a/TestData/TestFont1 (UFO2).ufo/glyphs/contents.plist b/Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/glyphs/contents.plist similarity index 100% rename from TestData/TestFont1 (UFO2).ufo/glyphs/contents.plist rename to Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/glyphs/contents.plist diff --git a/TestData/TestFont1 (UFO2).ufo/groups.plist b/Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/groups.plist similarity index 100% rename from TestData/TestFont1 (UFO2).ufo/groups.plist rename to Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/groups.plist diff --git a/TestData/TestFont1 (UFO2).ufo/kerning.plist b/Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/kerning.plist similarity index 100% rename from TestData/TestFont1 (UFO2).ufo/kerning.plist rename to Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/kerning.plist diff --git a/TestData/TestFont1 (UFO2).ufo/lib.plist b/Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/lib.plist similarity index 100% rename from TestData/TestFont1 (UFO2).ufo/lib.plist rename to Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/lib.plist diff --git a/TestData/TestFont1 (UFO2).ufo/metainfo.plist b/Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/metainfo.plist similarity index 100% rename from TestData/TestFont1 (UFO2).ufo/metainfo.plist rename to Lib/ufoLib/test/testdata/TestFont1 (UFO2).ufo/metainfo.plist diff --git a/TestData/UFO3-Read Data.ufo/data/org.unifiedfontobject.directory/bar/lol.txt b/Lib/ufoLib/test/testdata/UFO3-Read Data.ufo/data/org.unifiedfontobject.directory/bar/lol.txt similarity index 100% rename from TestData/UFO3-Read Data.ufo/data/org.unifiedfontobject.directory/bar/lol.txt rename to Lib/ufoLib/test/testdata/UFO3-Read Data.ufo/data/org.unifiedfontobject.directory/bar/lol.txt diff --git a/TestData/UFO3-Read Data.ufo/data/org.unifiedfontobject.directory/foo.txt b/Lib/ufoLib/test/testdata/UFO3-Read Data.ufo/data/org.unifiedfontobject.directory/foo.txt similarity index 100% rename from TestData/UFO3-Read Data.ufo/data/org.unifiedfontobject.directory/foo.txt rename to Lib/ufoLib/test/testdata/UFO3-Read Data.ufo/data/org.unifiedfontobject.directory/foo.txt diff --git a/TestData/UFO3-Read Data.ufo/data/org.unifiedfontobject.file.txt b/Lib/ufoLib/test/testdata/UFO3-Read Data.ufo/data/org.unifiedfontobject.file.txt similarity index 100% rename from TestData/UFO3-Read Data.ufo/data/org.unifiedfontobject.file.txt rename to Lib/ufoLib/test/testdata/UFO3-Read Data.ufo/data/org.unifiedfontobject.file.txt diff --git a/TestData/UFO3-Read Data.ufo/metainfo.plist b/Lib/ufoLib/test/testdata/UFO3-Read Data.ufo/metainfo.plist similarity index 100% rename from TestData/UFO3-Read Data.ufo/metainfo.plist rename to Lib/ufoLib/test/testdata/UFO3-Read Data.ufo/metainfo.plist diff --git a/MANIFEST.in b/MANIFEST.in index 464aec90e..aff919126 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,7 +3,6 @@ include README.md notes.txt LICENSE.txt include Documentation/Makefile recursive-include Documentation *.py *.rst -recursive-include Data *.plist *.glif -recursive-include TestData *.plist *.glif *.fea *.txt +recursive-include Lib/ufoLib/test/testdata *.plist *.glif *.fea *.txt include requirements.txt tox.ini diff --git a/setup.py b/setup.py index 540397c59..7e2f98912 100755 --- a/setup.py +++ b/setup.py @@ -29,6 +29,7 @@ setup_params = dict( long_description=long_description, package_dir={'': 'Lib'}, packages=find_packages('Lib'), + include_package_data=True, setup_requires=pytest_runner + wheel, tests_require=[ 'pytest>=3.0.2', diff --git a/tox.ini b/tox.ini index f24aae8d9..3edc2fe72 100644 --- a/tox.ini +++ b/tox.ini @@ -11,5 +11,6 @@ deps = pytest -rrequirements.txt commands = - # pass to pytest any extra positional arguments after `tox -- ...` - pytest {posargs} + # run the test suite against the package installed inside tox env. + # any extra positional arguments after `tox -- ...` are passed on to pytest + pytest {posargs:--pyargs ufoLib}