-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allowing non empty dirs to be deleted #3108
Changes from 10 commits
bcc343d
f24d3d7
a307af9
03d5d90
7f23ad6
773e55c
081dcd5
9733b14
31a6625
d136c12
98b8e2e
051cee6
b7e02a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -523,9 +523,10 @@ def test_delete_dirs(self): | |
self.assertEqual(listing, []) | ||
|
||
def test_delete_non_empty_dir(self): | ||
"""delete non-empty dir raises 400""" | ||
with assert_http_error(400): | ||
self.api.delete(u'å b') | ||
# Test that non empty directory can be deleted | ||
self.api.delete(u'å b') | ||
# Assertion will pass only if self.api.delete does not throw and error | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A test doesn't have to have an assert - you can leave this off, and it will still fail if there's an error. When a test just checks that something runs without an error, that's a 'smoketest' (as in 'does this make smoke come out'). However, it would be good to check that it has actually been removed as well. Maybe copy some code from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh okay. Sure, I'll make these changes! |
||
assert True | ||
|
||
def test_rename(self): | ||
resp = self.api.rename('foo/a.ipynb', 'foo/z.ipynb') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test that deleting a non-empty directory does work?