[Python-checkins] r54862 - sandbox/trunk/pep0/test_pep0.py

brett.cannon python-checkins at python.org
Wed Apr 18 05:14:54 CEST 2007


Author: brett.cannon
Date: Wed Apr 18 05:14:51 2007
New Revision: 54862

Modified:
   sandbox/trunk/pep0/test_pep0.py
Log:
Remove old test code for parsing PEP metadata.


Modified: sandbox/trunk/pep0/test_pep0.py
==============================================================================
--- sandbox/trunk/pep0/test_pep0.py	(original)
+++ sandbox/trunk/pep0/test_pep0.py	Wed Apr 18 05:14:51 2007
@@ -132,44 +132,6 @@
                 self.failUnlessEqual(got, expect)
 
 
-class ParseMetaDataTests(unittest.TestCase):
-
-    """Test the parsing of the headers of PEPs."""
-
-    def test_parse_known_formats(self):
-        # Handle specific metadata format types.
-        assert "PEP" in pep0.handlers
-        line = "PEP: 42"
-        info = {}
-        handled = pep0.parse_metadata(info, line)
-        self.failUnlessEqual(handled, "PEP")
-        self.failUnless("PEP" in info)
-        self.failUnlessEqual(info['PEP'], 42)
-
-    def test_parse_unknown_formats(self):
-        # If a format is not known then it should just be returned with
-        # whitespace stripped.
-        info = {}
-        type_ = "Spam"
-        data = "Monty Python"
-        line = "%s: %s" % (type_, data)
-        handled = pep0.parse_metadata(info, line)
-        self.failUnlessEqual(handled, type_)
-        self.failUnless(type_ in info)
-        self.failUnlessEqual(info[type_], data)
-
-    def test_multiline_formats(self):
-        # Deal with formats that can span multiple lines (e.g., authors and
-        # Post-History).
-        type_ = 'Prev'
-        info = {type_ : [1]}
-        data = 'A'
-        handled = pep0.parse_metadata(info, data, type_)
-        self.failUnlessEqual(handled, type_)
-        self.failUnlessEqual(len(info[type_]), 2)
-        self.failUnlessEqual(info[type_][1], data)
-
-
 class PEPClassTests(unittest.TestCase):
 
     """Test the PEP class."""


More information about the Python-checkins mailing list