Python pkg_resources.yield_lines() Examples
The following are 16
code examples of pkg_resources.yield_lines().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
pkg_resources
, or try the search function
.
Example #1
Source File: test_resources.py From pledgeservice with Apache License 2.0 | 5 votes |
def get_metadata_lines(self,name): return pkg_resources.yield_lines(self.get_metadata(name))
Example #2
Source File: test_resources.py From pledgeservice with Apache License 2.0 | 5 votes |
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)
Example #3
Source File: setup.py From synapse-tools with Apache License 2.0 | 5 votes |
def get_install_requires(): with open('requirements.txt', 'r') as f: minimal_reqs = list(yield_lines(f.read())) return minimal_reqs
Example #4
Source File: test_resources.py From pkg_resources with MIT License | 5 votes |
def get_metadata_lines(self, name): return pkg_resources.yield_lines(self.get_metadata(name))
Example #5
Source File: test_resources.py From pkg_resources with MIT License | 5 votes |
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
Example #6
Source File: test_resources.py From oss-ftp with MIT License | 5 votes |
def get_metadata_lines(self,name): return pkg_resources.yield_lines(self.get_metadata(name))
Example #7
Source File: test_resources.py From oss-ftp with MIT License | 5 votes |
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)
Example #8
Source File: setup.py From paasta with Apache License 2.0 | 5 votes |
def get_install_requires(): with open("requirements-minimal.txt", "r") as f: minimal_reqs = list(yield_lines(f.read())) return minimal_reqs
Example #9
Source File: test_resources.py From datafari with Apache License 2.0 | 5 votes |
def get_metadata_lines(self, name): return pkg_resources.yield_lines(self.get_metadata(name))
Example #10
Source File: test_resources.py From datafari with Apache License 2.0 | 5 votes |
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
Example #11
Source File: test_resources.py From setuptools with MIT License | 5 votes |
def get_metadata_lines(self, name): return pkg_resources.yield_lines(self.get_metadata(name))
Example #12
Source File: test_resources.py From setuptools with MIT License | 5 votes |
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
Example #13
Source File: test_resources.py From Flask with Apache License 2.0 | 5 votes |
def get_metadata_lines(self,name): return pkg_resources.yield_lines(self.get_metadata(name))
Example #14
Source File: test_resources.py From Flask with Apache License 2.0 | 5 votes |
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)
Example #15
Source File: test_resources.py From Flask with Apache License 2.0 | 5 votes |
def get_metadata_lines(self,name): return pkg_resources.yield_lines(self.get_metadata(name))
Example #16
Source File: test_resources.py From Flask with Apache License 2.0 | 5 votes |
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)