~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/script.py

  • Committer: Vincent Ladeuil
  • Date: 2010-12-07 10:16:53 UTC
  • mto: (5575.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 5576.
  • Revision ID: v.ladeuil+lp@free.fr-20101207101653-20iiufih26buvmy3
Use assertLength as it provides a better ouput to debug tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009, 2010, 2011 Canonical Ltd
 
1
# Copyright (C) 2009, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
25
25
import os
26
26
import shlex
27
27
import textwrap
 
28
from cStringIO import StringIO
28
29
 
29
30
from bzrlib import (
 
31
    errors,
30
32
    osutils,
31
33
    tests,
32
34
    )
481
483
    def setUp(self):
482
484
        super(TestCaseWithMemoryTransportAndScript, self).setUp()
483
485
        self.script_runner = ScriptRunner()
484
 
        # FIXME: See shelf_ui.Shelver._char_based. This allow using shelve in
485
 
        # scripts while providing a line-based input (better solution in
486
 
        # progress). -- vila 2011-09-28
487
 
        self.overrideEnv('INSIDE_EMACS', '1')
488
486
 
489
487
    def run_script(self, script, null_output_matches_anything=False):
490
488
        return self.script_runner.run_script(self, script, 
515
513
    def setUp(self):
516
514
        super(TestCaseWithTransportAndScript, self).setUp()
517
515
        self.script_runner = ScriptRunner()
518
 
        # FIXME: See shelf_ui.Shelver._char_based. This allow using shelve in
519
 
        # scripts while providing a line-based input (better solution in
520
 
        # progress). -- vila 2011-09-28
521
 
        self.overrideEnv('INSIDE_EMACS', '1')
522
516
 
523
517
    def run_script(self, script, null_output_matches_anything=False):
524
518
        return self.script_runner.run_script(self, script,