Commits

Antoine Pitrou committed 5146727

Remove normcase()

  • Participants
  • Parent commits 8f3f1d1
  • Branches pep428

Comments (0)

Files changed (3)

File docs/index.rst

       True
 
 
-.. method:: PurePath.normcase()
-
-   Return a case-folded version of the path.  Calling this method is *not*
-   needed before comparing path objects.
-
-
 .. method:: PurePath.parent(level=1)
 
    Return the path's parent at the *level*'th level.  If *level* is not given,
             return False
         return not self._flavour.has_drv or bool(self._drv)
 
-    def normcase(self):
-        """Return this path, possibly lowercased if the path flavour has
-        case-insensitive path semantics.
-        Calling this method is not needed before comparing Path instances."""
-        fix = self._flavour.casefold_parts
-        drv, = fix((self._drv,))
-        root = self._root
-        parts = fix(self._parts)
-        return self._from_parsed_parts(drv, root, parts)
-
     def is_reserved(self):
         """Return True if the path contains one of the special names reserved
         by the system, if any."""

File test_pathlib.py

         self.assertTrue(P('//a').is_absolute())
         self.assertTrue(P('//a/b').is_absolute())
 
-    def test_normcase(self):
-        P = self.cls
-        p = P('/Aa/Bb/Cc').normcase()
-        self.assertEqual(P('/Aa/Bb/Cc'), p)
-        self.assertEqual('/Aa/Bb/Cc', str(p))
-
     def test_is_reserved(self):
         P = self.cls
         self.assertIs(False, P('').is_reserved())
         self.assertTrue(P('//a/b/c').is_absolute())
         self.assertTrue(P('//a/b/c/d').is_absolute())
 
-    def test_normcase(self):
-        P = self.cls
-        p = P('D:/Aa/Bb/Cc').normcase()
-        self.assertEqual(P('d:/aa/bb/cc'), p)
-        self.assertEqual(r'd:\aa\bb\cc', str(p))
-
     def test_is_reserved(self):
         P = self.cls
         self.assertIs(False, P('').is_reserved())