~crunch.io/ubuntu/precise/codespeak-lib/unstable

« back to all changes in this revision

Viewing changes to testing/process/test_cmdexec.py

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lamb
  • Date: 2010-08-01 16:24:01 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100801162401-g37v49d1p148alpm
Tags: 1.3.3-1
* New upstream release.
* Bump Standards-Version to 3.9.1.
* Fix typo in py.test manpage.
* Prefer Breaks: over Conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
    def test_simple(self):
9
9
        out = cmdexec('echo hallo')
10
10
        assert out.strip() == 'hallo'
 
11
        assert py.builtin._istext(out)
11
12
 
12
13
    def test_simple_newline(self):
13
14
        import sys
14
15
        out = cmdexec(r"""%s -c "print ('hello')" """ % sys.executable)
15
16
        assert out == 'hello\n'
 
17
        assert py.builtin._istext(out)
16
18
 
17
19
    def test_simple_error(self):
18
20
        py.test.raises (cmdexec.Error, cmdexec, 'exit 1')