From 26de7bc9c2a34d0c33df41746cd1bff99b527e15 Mon Sep 17 00:00:00 2001 From: cactrot Date: Thu, 24 Sep 2020 13:29:59 -0400 Subject: [PATCH] Update test_cadquery.py Changed directory to point to test data. --- tests/test_cadquery.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_cadquery.py b/tests/test_cadquery.py index cff20cd5..e4a82071 100644 --- a/tests/test_cadquery.py +++ b/tests/test_cadquery.py @@ -24,6 +24,9 @@ from tests import ( makeCube, ) +# test data directory +testdataDir = os.path.join(os.path.dirname(__file__), "testdata") + # where unit test output will be saved OUTDIR = tempfile.gettempdir() SUMMARY_FILE = os.path.join(OUTDIR, "testSummary.html") @@ -2699,7 +2702,7 @@ class TestCadQuery(BaseTest): self.assertAlmostEqual(obj1.val().Volume(), obj2.val().Volume()) def testText(self): - global OUTDIR + global testdataDir box = Workplane("XY").box(4, 4, 0.5) @@ -2757,7 +2760,7 @@ class TestCadQuery(BaseTest): "CQ 2.0", 0.5, 0.05, - fontPath=os.path.join(OUTDIR, "Sans.ttf"), + fontPath=os.path.join(testdataDir, "OpenSans-Regular.ttf"), cut=False, combine=False, halign="right",