/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 doc/developers/testing.txt

  • Committer: Martin Pool
  • Date: 2010-08-13 07:56:06 UTC
  • mfrom: (5050.17.4 2.2)
  • mto: (5050.17.6 2.2)
  • mto: This revision was merged to the branch mainline in revision 5379.
  • Revision ID: mbp@sourcefrog.net-20100813075606-8zgmov3ezwans2zo
merge bzr 2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
395
395
The actual use of ScriptRunner within a TestCase looks something like
396
396
this::
397
397
 
398
 
        def test_unshelve_keep(self):
399
 
                # some setup here
400
 
                sr = ScriptRunner()
401
 
                sr.run_script(self, '''
402
 
        $ bzr add file
403
 
        $ bzr shelve --all -m Foo
404
 
        $ bzr shelve --list
405
 
        1: Foo
406
 
        $ bzr unshelve --keep
407
 
        $ bzr shelve --list
408
 
        1: Foo
409
 
        $ cat file
410
 
        contents of file
411
 
        ''')
 
398
    from bzrlib.tests import script
 
399
 
 
400
    def test_unshelve_keep(self):
 
401
        # some setup here
 
402
        script.run_script(self, '''
 
403
            $ bzr add file
 
404
            $ bzr shelve --all -m Foo
 
405
            $ bzr shelve --list
 
406
            1: Foo
 
407
            $ bzr unshelve --keep
 
408
            $ bzr shelve --list
 
409
            1: Foo
 
410
            $ cat file
 
411
            contents of file
 
412
            ''')
412
413
 
413
414
 
414
415
Import tariff tests
872
873
.. |--| unicode:: U+2014
873
874
 
874
875
..
875
 
   vim: ft=rst tw=74 ai
 
876
   vim: ft=rst tw=74 ai et sw=4