def test_multiline(self): self.assertEqual([('', 'keyring'), ('', 'pbr')], list( sorted( requirements.parse_requirements( textwrap.dedent(''' pbr>=1.6 keyring==7.3 ''')).keys())))
def test_simple(self): self.assertEqual( [('', 'pbr')], list( requirements.parse_requirements( textwrap.dedent(''' pbr>=1.6 ''')).keys()), )
def test_comments(self): self.assertEqual({}, requirements.parse_requirements('#')) self.assertEqual({}, requirements.parse_requirements('#\n'))
def test_empty(self): self.assertEqual({}, requirements.parse_requirements('')) self.assertEqual({}, requirements.parse_requirements('\n'))