test_converters.py 文件源码

python
阅读 39 收藏 0 点赞 0 评论 0

项目:PyKED 作者: pr-omethe-us 项目源码 文件源码
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.'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号