/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/blackbox/test_mv.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-11-16 18:59:44 UTC
  • mfrom: (7143.15.15 more-cleanups)
  • Revision ID: breezy.the.bot@gmail.com-20181116185944-biefv1sub37qfybm
Sprinkle some PEP8iness.

Merged from https://code.launchpad.net/~jelmer/brz/more-cleanups/+merge/358611

Show diffs side-by-side

added added

removed removed

Lines of Context:
234
234
        self.run_bzr_error(
235
235
            ["^brz: ERROR: Could not move a => b. b is already versioned\\.$"],
236
236
            'mv a b')
237
 
        #check that nothing changed
 
237
        # check that nothing changed
238
238
        self.assertPathDoesNotExist('a')
239
239
        self.assertPathExists('b')
240
240
 
325
325
        tree.add(['a'])
326
326
 
327
327
        osutils.rename('a', 'b')
328
 
        self.build_tree(['a']) #touch a
 
328
        self.build_tree(['a'])  # touch a
329
329
        self.run_bzr_error(
330
330
            ["^brz: ERROR: Could not rename a => b because both files exist."
331
331
             " \\(Use --after to tell brz about a rename that has already"
349
349
        tree = self.make_branch_and_tree('.')
350
350
        tree.add(['a'])
351
351
        osutils.rename('a', 'b')
352
 
        self.build_tree(['a']) #touch a
 
352
        self.build_tree(['a'])  # touch a
353
353
 
354
354
        self.run_bzr('mv a b --after')
355
355
        self.assertPathExists('a')
356
 
        self.assertNotInWorkingTree('a')#a should be unknown now.
 
356
        self.assertNotInWorkingTree('a')  # a should be unknown now.
357
357
        self.assertPathExists('b')
358
358
        self.assertInWorkingTree('b')
359
359
 
373
373
        tree.add(['a1', 'a2', 'sub'])
374
374
        osutils.rename('a1', 'sub/a1')
375
375
        osutils.rename('a2', 'sub/a2')
376
 
        self.build_tree(['a1']) #touch a1
377
 
        self.build_tree(['a2']) #touch a2
 
376
        self.build_tree(['a1'])  # touch a1
 
377
        self.build_tree(['a2'])  # touch a2
378
378
 
379
379
        self.run_bzr_error(
380
380
            ["^brz: ERROR: Could not rename a1 => sub/a1 because both files"
404
404
        tree.add(['a1', 'a2', 'sub'])
405
405
        osutils.rename('a1', 'sub/a1')
406
406
        osutils.rename('a2', 'sub/a2')
407
 
        self.build_tree(['a1']) #touch a1
408
 
        self.build_tree(['a2']) #touch a2
 
407
        self.build_tree(['a1'])  # touch a1
 
408
        self.build_tree(['a2'])  # touch a2
409
409
 
410
410
        self.run_bzr('mv a1 a2 sub --after')
411
411
        self.assertPathExists('a1')
517
517
        tree = self.make_branch_and_tree(".")
518
518
        self.build_tree([u"\xA7"])
519
519
        out, err = self.run_bzr_error(["Could not rename", "not versioned"],
520
 
            ["mv", u"\xA7", "b"])
 
520
                                      ["mv", u"\xA7", "b"])
521
521
 
522
522
    def test_mv_removed_non_ascii(self):
523
523
        """Clear error on mv of a removed non-ascii file, see lp:898541"""
528
528
        tree.commit(u"Adding \xA7")
529
529
        os.remove(u"\xA7")
530
530
        out, err = self.run_bzr_error(["Could not rename", "not exist"],
531
 
            ["mv", u"\xA7", "b"])
 
531
                                      ["mv", u"\xA7", "b"])