summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2016-05-19 13:10:20 -0700
committerGuido van Rossum <guido@python.org>2016-05-19 13:10:20 -0700
commit387e6e38175b853741c4f35e08791f0990bc0845 (patch)
treed869c7273239c3991c3e5a54ae6966462260ac3c /Lib
parentd8bf09c6cd1137b148a06a0283c060e3e1e6cc46 (diff)
parent3d4d01f614d894327bbdc1feadebd50b2d3621ff (diff)
downloadcpython-git-387e6e38175b853741c4f35e08791f0990bc0845.tar.gz
Back out pathlib.Path.path attr. (Merge 3.4->3.5)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/pathlib.py7
-rw-r--r--Lib/test/test_pathlib.py27
2 files changed, 0 insertions, 34 deletions
diff --git a/Lib/pathlib.py b/Lib/pathlib.py
index ed31ddb8dd..caf685ee6b 100644
--- a/Lib/pathlib.py
+++ b/Lib/pathlib.py
@@ -693,13 +693,6 @@ class PurePath(object):
self._parts) or '.'
return self._str
- @property
- def path(self):
- try:
- return self._str
- except AttributeError:
- return str(self)
-
def as_posix(self):
"""Return the string representation of the path with forward (/)
slashes."""
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
index 0ea4aef470..fa96d9f882 100644
--- a/Lib/test/test_pathlib.py
+++ b/Lib/test/test_pathlib.py
@@ -477,22 +477,6 @@ class _BasePurePathTest(object):
self.assertEqual(P('a/b.py').name, 'b.py')
self.assertEqual(P('/a/b.py').name, 'b.py')
- def test_path_common(self):
- P = self.cls
- def check(arg, expected=None):
- if expected is None:
- expected = arg
- self.assertEqual(P(arg).path, expected.replace('/', self.sep))
- check('', '.')
- check('.')
- check('/')
- check('a/b')
- check('/a/b')
- check('/a/b/', '/a/b')
- check('/a/b/.', '/a/b')
- check('a/b.py')
- check('/a/b.py')
-
def test_suffix_common(self):
P = self.cls
self.assertEqual(P('').suffix, '')
@@ -915,17 +899,6 @@ class PureWindowsPathTest(_BasePurePathTest, unittest.TestCase):
self.assertEqual(P('//My.py/Share.php').name, '')
self.assertEqual(P('//My.py/Share.php/a/b').name, 'b')
- def test_path(self):
- P = self.cls
- self.assertEqual(P('c:').path, 'c:')
- self.assertEqual(P('c:/').path, 'c:\\')
- self.assertEqual(P('c:a/b').path, 'c:a\\b')
- self.assertEqual(P('c:/a/b').path, 'c:\\a\\b')
- self.assertEqual(P('c:a/b.py').path, 'c:a\\b.py')
- self.assertEqual(P('c:/a/b.py').path, 'c:\\a\\b.py')
- self.assertEqual(P('//My.py/Share.php').path, '\\\\My.py\\Share.php\\')
- self.assertEqual(P('//My.py/Share.php/a/b').path, '\\\\My.py\\Share.php\\a\\b')
-
def test_suffix(self):
P = self.cls
self.assertEqual(P('c:').suffix, '')