Skip to content
Browse files

Expanded docstrings

  • Loading branch information...
1 parent 4ca082c commit aed55bfc0481aa361c21bac5698012decbf93470 @jaraco committed Nov 13, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 test_path.py
View
8 test_path.py
@@ -175,6 +175,11 @@ def testExplicitModuleClasses(self):
self.assertEqual(nt_path.__name__, 'path_ntpath')
class ReturnSelfTestCase(unittest.TestCase):
+ """
+ Some methods don't necessarily return any value (i.e. makedirs,
+ makedirs_p, rename, mkdir, touch, chroot). These methods should return
+ self anyhow to allow methods to be chained.
+ """
def setUp(self):
# Create a temporary directory.
f = tempfile.mktemp()
@@ -187,6 +192,9 @@ def tearDown(self):
shutil.rmtree(self.tempdir)
def testMakedirs_pReturnsSelf(self):
+ """
+ path('foo').makedirs_p() == path('foo')
+ """
p = path(self.tempdir) / "newpath"
ret = p.makedirs_p()
self.assertEquals(p, ret)

0 comments on commit aed55bf

Please sign in to comment.
Something went wrong with that request. Please try again.