summaryrefslogtreecommitdiffstats
path: root/testsuite/common.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-10-02 11:55:49 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-10-02 11:55:49 -0400
commit26c906478fc8cbb74929e929c822cd7e24de4e35 (patch)
tree1da606ec7e1a7259cd167595e7c84d36446b03d0 /testsuite/common.py
parent378575687532d10915dc0327389c953281d7a2ba (diff)
downloadbcfg2-26c906478fc8cbb74929e929c822cd7e24de4e35.tar.gz
bcfg2-26c906478fc8cbb74929e929c822cd7e24de4e35.tar.bz2
bcfg2-26c906478fc8cbb74929e929c822cd7e24de4e35.zip
testsuite: unit tests for Cfg plugin and base handlers
Diffstat (limited to 'testsuite/common.py')
-rw-r--r--testsuite/common.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/common.py b/testsuite/common.py
index 3aeeaf5f2..5d8157e55 100644
--- a/testsuite/common.py
+++ b/testsuite/common.py
@@ -284,3 +284,10 @@ class patchIf(object):
# 10 args -- mocksignature has been removed
args.pop(5)
return _noop_patch(*args)(func)
+
+
+try:
+ re_type = re._pattern_type
+except AttributeError:
+ re_type = type(re.compile(""))
+