7
7
8
8
9
9
def test_PsfontsMap (monkeypatch ):
10
- monkeypatch .setattr (dr , 'find_tex_file' , lambda x : x )
10
+ monkeypatch .setattr (dr , 'find_tex_file' , lambda x : x . decode () )
11
11
12
12
filename = str (Path (__file__ ).parent / 'baseline_images/dviread/test.map' )
13
13
fontmap = dr .PsfontsMap (filename )
@@ -18,15 +18,15 @@ def test_PsfontsMap(monkeypatch):
18
18
assert entry .texname == key
19
19
assert entry .psname == b'PSfont%d' % n
20
20
if n not in [3 , 5 ]:
21
- assert entry .encoding == b 'font%d.enc' % n
21
+ assert entry .encoding == 'font%d.enc' % n
22
22
elif n == 3 :
23
- assert entry .encoding == b 'enc3.foo'
23
+ assert entry .encoding == 'enc3.foo'
24
24
# We don't care about the encoding of TeXfont5, which specifies
25
25
# multiple encodings.
26
26
if n not in [1 , 5 ]:
27
- assert entry .filename == b 'font%d.pfa' % n
27
+ assert entry .filename == 'font%d.pfa' % n
28
28
else :
29
- assert entry .filename == b 'font%d.pfb' % n
29
+ assert entry .filename == 'font%d.pfb' % n
30
30
if n == 4 :
31
31
assert entry .effects == {'slant' : - 0.1 , 'extend' : 1.2 }
32
32
else :
@@ -37,13 +37,13 @@ def test_PsfontsMap(monkeypatch):
37
37
assert entry .encoding is None
38
38
entry = fontmap [b'TeXfont7' ]
39
39
assert entry .filename is None
40
- assert entry .encoding == b 'font7.enc'
40
+ assert entry .encoding == 'font7.enc'
41
41
entry = fontmap [b'TeXfont8' ]
42
- assert entry .filename == b 'font8.pfb'
42
+ assert entry .filename == 'font8.pfb'
43
43
assert entry .encoding is None
44
44
entry = fontmap [b'TeXfont9' ]
45
45
assert entry .psname == b'TeXfont9'
46
- assert entry .filename == b '/absolute/font9.pfb'
46
+ assert entry .filename == '/absolute/font9.pfb'
47
47
# First of duplicates only.
48
48
entry = fontmap [b'TeXfontA' ]
49
49
assert entry .psname == b'PSfontA1'
0 commit comments