[py-svn] r36763 - in py/dist/py/path: . testing
hpk at codespeak.net
hpk at codespeak.net
Sun Jan 14 22:11:34 CET 2007
Author: hpk
Date: Sun Jan 14 22:11:33 2007
New Revision: 36763
Modified:
py/dist/py/path/common.py
py/dist/py/path/testing/common.py
Log:
remove deprecated 'get()' method
Modified: py/dist/py/path/common.py
==============================================================================
--- py/dist/py/path/common.py (original)
+++ py/dist/py/path/common.py Sun Jan 14 22:11:33 2007
@@ -162,23 +162,20 @@
return last
def __add__(self, other):
+ """ return new path object with 'other' added to the basename"""
return self.new(basename=self.basename+str(other))
def __cmp__(self, other):
+ """ return sort value (-1, 0, +1). """
try:
return cmp(self.strpath, other.strpath)
except AttributeError:
return cmp(str(self), str(other)) # self.path, other.path)
def __repr__(self):
+ """ return a string representation of this path. """
return repr(str(self))
- def get(self, spec):
- """ deprecated, use _getbyspec if you really need it. """
- py.std.warnings.warn("path.get() is deprecated",
- DeprecationWarning, stacklevel=2)
- return self._getbyspec(spec)
-
def visit(self, fil=None, rec=None, ignore=_dummyclass):
if isinstance(fil, str):
fil = fnmatch(fil)
Modified: py/dist/py/path/testing/common.py
==============================================================================
--- py/dist/py/path/testing/common.py (original)
+++ py/dist/py/path/testing/common.py Sun Jan 14 22:11:33 2007
@@ -4,9 +4,6 @@
class CommonPathTests:
root = None # subclasses have to setup a 'root' attribute
- def test_get_deprecation(self):
- py.test.deprecated_call(self.root.get, "basename")
-
def test_constructor_equality(self):
p = self.root.__class__(self.root)
assert p == self.root
More information about the pytest-commit
mailing list