Пример #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'))