File: use-vlgothic-package-on-fullpath.patch

package info (click to toggle)
blockdiag 1.5.3%2Bdfsg-5.2
  • links: PTS
  • area: main
  • in suites: buster
  • size: 1,664 kB
  • sloc: python: 8,535; makefile: 13; sh: 1
file content (33 lines) | stat: -rw-r--r-- 1,163 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Description: Use VLGothic font file on fullpath for testing.

Author: Kouhei Maeda <mkouhei@palmtb.net>
Forwarded: no
Last-Update: 2017-05-25
Index: blockdiag-1.5.3+dfsg/src/blockdiag/tests/test_generate_diagram.py
===================================================================
--- blockdiag-1.5.3+dfsg.orig/src/blockdiag/tests/test_generate_diagram.py	2017-05-25 22:47:47.057680607 +0900
+++ blockdiag-1.5.3+dfsg/src/blockdiag/tests/test_generate_diagram.py	2017-05-25 22:54:24.021680607 +0900
@@ -15,12 +15,7 @@
     import unittest
 
 
-TESTDIR = os.path.dirname(__file__)
-FONTPATH = os.path.join(TESTDIR, 'VLGothic', 'VL-Gothic-Regular.ttf')
-
-
-def get_fontpath(testdir):
-    return os.path.join(testdir, 'VLGothic', 'VL-Gothic-Regular.ttf')
+FONTPATH = '/usr/share/fonts/truetype/vlgothic/VL-Gothic-Regular.ttf'
 
 
 def get_diagram_files(testdir):
@@ -58,8 +53,7 @@
 
 @nottest
 def testcase_generator(basepath, mainfunc, files, options):
-    fontpath = get_fontpath(basepath)
-    options = options + ['-f', fontpath]
+    options = options + ['-f', FONTPATH]
 
     for source in files:
         yield generate, mainfunc, 'svg', source, options