File tree 1 file changed +16
-0
lines changed 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 13
13
import json
14
14
import pytest
15
15
import sqlite3
16
+ import warnings
16
17
17
18
18
19
def test_PsfontsMap (monkeypatch ):
@@ -163,3 +164,18 @@ def test_find_tex_files(tmpdir):
163
164
{'foo.pfb' : '{s}tmp{s}foo.pfb' .format (s = os .path .sep ),
164
165
'cmr10.tfm' : '{s}usr{s}local{s}cmr10.tfm' .format (s = os .path .sep )}
165
166
assert mock_popen .called
167
+
168
+
169
+ def test_find_tex_file_format ():
170
+ with mock .patch ('matplotlib.dviread.subprocess.Popen' ) as mock_popen :
171
+ mock_proc = mock .Mock ()
172
+ stdout = b'/foo/bar/baz\n '
173
+ mock_proc .configure_mock (** {'communicate.return_value' : (stdout , b'' )})
174
+ mock_popen .return_value = mock_proc
175
+
176
+ warnings .filterwarnings (
177
+ 'ignore' ,
178
+ 'The format option to find_tex_file is deprecated.*' ,
179
+ UserWarning )
180
+ assert dr .find_tex_file ('foobar' , format = 'tfm' ) == '/foo/bar/baz'
181
+ assert mock_popen .called
You can’t perform that action at this time.
0 commit comments