Code review comment for lp:~parthm/bzr/138600

Revision history for this message
Vincent Ladeuil (vila) wrote :

51 +class TestMkdir(TestCaseWithTransport):
52 +

use a safety bzr repo to guard against leaking tests (that may try
to write in a bzr containing repo, outside of their environment,
see bzrlib.tests.TestCaseWithMemoryTransport._check_safety_net).

So:

59 + def test_mkdir_outside_unversioned_dir(self):
60 + """'mkdir' should fail with unversioned directory in path. Bug #138600"""

67 + def test_mkdir_inside_unversioned_dir(self):
68 + """'mkdir' should fail cleanly from within an unversioned directory. Bug #138600"""

and

75 + def test_mkdir_outside_unversioned_dir_within_branch(self):
76 + """'mkdir' should fail with unversioned directory inside branch. Bug #138600"""

don't test what you think they test, since they are all inside a valid branch.

86 + def test_mkdir_inside_unversioned_dir_within_branch(self):
87 + """'mkdir' should fail cleanly from within an unversioned directory

is valid, but don't need to create a branch since you're working outside of this created branch
anyway.

Since we requires a working tree,

53 + def test_mkdir_in_repo(self):
54 + """'mkdir' should fail cleanly withing a repo. Bug #138600"""

is enough to test your change since we indeed raise NotVersionedError here.

I'll delete these tests and merge.

I'll delete them and merge.

review: Approve

« Back to merge proposal