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