Exemple #1
0
 def test_description_invalid_rst(self):
     # make sure bad rst is well handled in the description attribute
     metadata = Metadata()
     description = ':funkie:`str`'  # mimic Sphinx-specific markup
     metadata['description'] = description
     missing, warnings = metadata.check(restructuredtext=True)
     warning = warnings[0][1]
     self.assertIn('funkie', warning)
Exemple #2
0
 def test_check_homepage(self):
     metadata = Metadata()
     metadata['Version'] = '1.0'
     metadata['Name'] = 'vimpdb'
     metadata['Author'] = 'Monty Python'
     metadata.docutils_support = False
     missing, warnings = metadata.check()
     self.assertEqual(missing, ['Home-page'])
Exemple #3
0
 def test_check_author(self):
     metadata = Metadata()
     metadata['Version'] = '1.0'
     metadata['Name'] = 'vimpdb'
     metadata['Home-page'] = 'http://pypi.python.org'
     metadata.docutils_support = False
     missing, warnings = metadata.check()
     self.assertEqual(missing, ['Author'])
Exemple #4
0
 def test_description_invalid_rst(self):
     # make sure bad rst is well handled in the description attribute
     metadata = Metadata()
     description = ':funkie:`str`'  # mimic Sphinx-specific markup
     metadata['description'] = description
     missing, warnings = metadata.check(restructuredtext=True)
     warning = warnings[0][1]
     self.assertIn('funkie', warning)
Exemple #5
0
 def test_check_homepage(self):
     metadata = Metadata()
     metadata['Version'] = '1.0'
     metadata['Name'] = 'vimpdb'
     metadata['Author'] = 'Monty Python'
     metadata.docutils_support = False
     missing, warnings = metadata.check()
     self.assertEqual(missing, ['Home-page'])
Exemple #6
0
 def test_check_author(self):
     metadata = Metadata()
     metadata['Version'] = '1.0'
     metadata['Name'] = 'vimpdb'
     metadata['Home-page'] = 'http://pypi.python.org'
     metadata.docutils_support = False
     missing, warnings = metadata.check()
     self.assertEqual(missing, ['Author'])
Exemple #7
0
 def test_check_predicates(self):
     metadata = Metadata()
     metadata['Version'] = 'rr'
     metadata['Name'] = 'vimpdb'
     metadata['Home-page'] = 'http://pypi.python.org'
     metadata['Author'] = 'Monty Python'
     metadata['Requires-dist'] = ['Foo (a)']
     metadata['Obsoletes-dist'] = ['Foo (a)']
     metadata['Provides-dist'] = ['Foo (a)']
     missing, warnings = metadata.check()
     self.assertEqual(len(warnings), 4)
Exemple #8
0
 def test_check_predicates(self):
     metadata = Metadata()
     metadata['Version'] = 'rr'
     metadata['Name'] = 'vimpdb'
     metadata['Home-page'] = 'http://pypi.python.org'
     metadata['Author'] = 'Monty Python'
     metadata['Requires-dist'] = ['Foo (a)']
     metadata['Obsoletes-dist'] = ['Foo (a)']
     metadata['Provides-dist'] = ['Foo (a)']
     missing, warnings = metadata.check()
     self.assertEqual(len(warnings), 4)