def test_conversion_respth2ck_default_output(self):
"""Test respth2ck converter when used via command-line arguments.
"""
file_path = os.path.join('testfile_st.xml')
filename = pkg_resources.resource_filename(__name__, file_path)
with TemporaryDirectory() as temp_dir:
xml_file = copy(filename, temp_dir)
with pytest.warns(UserWarning) as record:
respth2ck(['-i', xml_file])
newfile = os.path.join(os.path.splitext(xml_file)[0] + '.yaml')
assert os.path.exists(newfile)
m = str(record.pop(UserWarning).message)
assert m == 'Using DOI to obtain reference information, rather than preferredKey.'
评论列表
文章目录