File: syscall_test.py

package info (click to toggle)
python-pymummer 0.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 344 kB
  • sloc: python: 2,385; sh: 55; makefile: 4
file content (14 lines) | stat: -rw-r--r-- 388 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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")