Python pkg_resources 模块,yield_lines() 实例源码

我们从Python开源项目中,提取了以下39个代码示例,用于说明如何使用pkg_resources.yield_lines()

项目:rwt    作者:jaraco    | 项目源码 | 文件源码
def read(self):
        """
        >>> DepsReader("__requires__=['foo']").read()
        ['foo']
        """
        reqs_raw = self._read('__requires__')
        strings = map(str, pkg_resources.parse_requirements(reqs_raw))
        deps = Dependencies(strings)
        try:
            deps.index_url = self._read('__index_url__')
        except Exception:
            pass
        try:
            raw_links = self._read('__dependency_links__')
        except Exception:
            pass
        else:
            deps.dependency_links = list(pkg_resources.yield_lines(raw_links))
        return deps
项目:Flask_Blog    作者:sugarguo    | 项目源码 | 文件源码
def get_metadata_lines(self,name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:Flask_Blog    作者:sugarguo    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            self.assertEqual(list(pkg_resources.yield_lines(inp)),out)
项目:flasky    作者:RoseOu    | 项目源码 | 文件源码
def get_metadata_lines(self,name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:flasky    作者:RoseOu    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            self.assertEqual(list(pkg_resources.yield_lines(inp)),out)
项目:chihu    作者:yelongyu    | 项目源码 | 文件源码
def get_metadata_lines(self,name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:chihu    作者:yelongyu    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            self.assertEqual(list(pkg_resources.yield_lines(inp)),out)
项目:Price-Comparator    作者:Thejas-1    | 项目源码 | 文件源码
def get_metadata_lines(self,name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:Price-Comparator    作者:Thejas-1    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            self.assertEqual(list(pkg_resources.yield_lines(inp)),out)
项目:chalktalk_docs    作者:loremIpsum1771    | 项目源码 | 文件源码
def get_metadata_lines(self, name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:chalktalk_docs    作者:loremIpsum1771    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            assert list(pkg_resources.yield_lines(inp)) == out
项目:Flask-NvRay-Blog    作者:rui7157    | 项目源码 | 文件源码
def get_metadata_lines(self,name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:Flask-NvRay-Blog    作者:rui7157    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            self.assertEqual(list(pkg_resources.yield_lines(inp)),out)
项目:NeuroMobile    作者:AndrewADykman    | 项目源码 | 文件源码
def get_metadata_lines(self,name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:NeuroMobile    作者:AndrewADykman    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            self.assertEqual(list(pkg_resources.yield_lines(inp)),out)
项目:dymo-m10-python    作者:pbrf    | 项目源码 | 文件源码
def get_metadata_lines(self,name):
        return yield_lines(self.get_metadata(name))
项目:dymo-m10-python    作者:pbrf    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            self.assertEqual(list(pkg_resources.yield_lines(inp)),out)
项目:Sudoku-Solver    作者:ayush1997    | 项目源码 | 文件源码
def get_metadata_lines(self, name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:Sudoku-Solver    作者:ayush1997    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            assert list(pkg_resources.yield_lines(inp)) == out
项目:pkg_resources    作者:pypa    | 项目源码 | 文件源码
def get_metadata_lines(self, name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:pkg_resources    作者:pypa    | 项目源码 | 文件源码
def testYielding(self):
        for inp, out in [
            ([], []), ('x', ['x']), ([[]], []), (' x\n y', ['x', 'y']),
            (['x\n\n', 'y'], ['x', 'y']),
        ]:
            assert list(pkg_resources.yield_lines(inp)) == out
项目:setuptools    作者:pypa    | 项目源码 | 文件源码
def get_metadata_lines(self, name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:setuptools    作者:pypa    | 项目源码 | 文件源码
def testYielding(self):
        for inp, out in [
            ([], []), ('x', ['x']), ([[]], []), (' x\n y', ['x', 'y']),
            (['x\n\n', 'y'], ['x', 'y']),
        ]:
            assert list(pkg_resources.yield_lines(inp)) == out
项目:kbe_server    作者:xiaohaoppy    | 项目源码 | 文件源码
def get_metadata_lines(self,name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:kbe_server    作者:xiaohaoppy    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            self.assertEqual(list(pkg_resources.yield_lines(inp)),out)
项目:micro-blog    作者:nickChenyx    | 项目源码 | 文件源码
def get_metadata_lines(self,name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:micro-blog    作者:nickChenyx    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            self.assertEqual(list(pkg_resources.yield_lines(inp)),out)
项目:browser_vuln_check    作者:lcatro    | 项目源码 | 文件源码
def get_metadata_lines(self, name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:browser_vuln_check    作者:lcatro    | 项目源码 | 文件源码
def testYielding(self):
        for inp, out in [
            ([], []), ('x', ['x']), ([[]], []), (' x\n y', ['x', 'y']),
            (['x\n\n', 'y'], ['x', 'y']),
        ]:
            assert list(pkg_resources.yield_lines(inp)) == out
项目:facebook-face-recognition    作者:mathur    | 项目源码 | 文件源码
def get_metadata_lines(self, name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:facebook-face-recognition    作者:mathur    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            assert list(pkg_resources.yield_lines(inp)) == out
项目:facebook-face-recognition    作者:mathur    | 项目源码 | 文件源码
def get_metadata_lines(self, name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:facebook-face-recognition    作者:mathur    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            assert list(pkg_resources.yield_lines(inp)) == out
项目:MyFriend-Rob    作者:lcheniv    | 项目源码 | 文件源码
def get_metadata_lines(self, name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:MyFriend-Rob    作者:lcheniv    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            assert list(pkg_resources.yield_lines(inp)) == out
项目:Alfred    作者:jkachhadia    | 项目源码 | 文件源码
def get_metadata_lines(self,name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:Alfred    作者:jkachhadia    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            self.assertEqual(list(pkg_resources.yield_lines(inp)),out)
项目:BD_T2    作者:jfmolano1587    | 项目源码 | 文件源码
def get_metadata_lines(self,name):
        return pkg_resources.yield_lines(self.get_metadata(name))
项目:BD_T2    作者:jfmolano1587    | 项目源码 | 文件源码
def testYielding(self):
        for inp,out in [
            ([], []), ('x',['x']), ([[]],[]), (' x\n y', ['x','y']),
            (['x\n\n','y'], ['x','y']),
        ]:
            self.assertEqual(list(pkg_resources.yield_lines(inp)),out)