diff options
author | smiddlek <smiddlek@b1010a0a-674b-0410-b734-77272b80c875> | 2012-11-16 19:17:52 +0000 |
---|---|---|
committer | smiddlek <smiddlek@b1010a0a-674b-0410-b734-77272b80c875> | 2012-11-16 19:17:52 +0000 |
commit | 160491d0384285698d726b1af21277f336107f51 (patch) | |
tree | eac4e643847865508bdf7ff2db51525650a2530e /mox.py | |
parent | 836982b46ab9e1e60b12009aa5abab384131c697 (diff) | |
download | mox-master.tar.gz |
git-svn-id: http://pymox.googlecode.com/svn/trunk@75 b1010a0a-674b-0410-b734-77272b80c875
Diffstat (limited to 'mox.py')
-rwxr-xr-x | mox.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -61,6 +61,10 @@ Suggested usage / workflow: my_mox.VerifyAll() """ +try: + import abc +except ImportError: + abc = None # Python 2.5 and earlier from collections import deque import difflib import inspect @@ -260,6 +264,8 @@ class Mox(object): # A list of types that may be stubbed out with a MockObjectFactory. _USE_MOCK_FACTORY = [types.ClassType, types.ObjectType, types.TypeType] + if abc: + _USE_MOCK_FACTORY.append(abc.ABCMeta) def __init__(self): """Initialize a new Mox.""" |