File: mockup.py

package info (click to toggle)
python-ptrace 0.7-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 680 kB
  • ctags: 1,002
  • sloc: python: 6,659; ansic: 263; makefile: 13; sh: 1
file content (14 lines) | stat: -rw-r--r-- 247 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"""
Mockup classes used in unit tests.
"""

class FakeProcess(object):
    def __init__(self):
        self.regs = {}

    def setreg(self, name, value):
        self.regs[name] = value

    def getreg(self, name):
        return self.regs[name]