File: syscall_test.py

package info (click to toggle)
python-pymummer 0.11.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 320 kB
  • sloc: python: 1,074; sh: 55; makefile: 6
file content (16 lines) | stat: -rw-r--r-- 390 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import unittest
import os
from pymummer import syscall


class TestSyscall(unittest.TestCase):
    def test_run_fail(self):
        '''Test that run raises error when command fails'''
        with self.assertRaises(syscall.Error):
            syscall.run('notacommandandthrowerror')


    def test_run_ok(self):
        '''Test run is ok on command that works'''
        syscall.run('ls')