From fe716cc6c541239a34d55c0ca5812379a821779a Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Tue, 21 Aug 2012 09:08:14 -0400 Subject: fixed builtin mocks for py3k --- testsuite/common.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'testsuite/common.py') diff --git a/testsuite/common.py b/testsuite/common.py index e0a27b2c7..cc24112e7 100644 --- a/testsuite/common.py +++ b/testsuite/common.py @@ -1,4 +1,5 @@ import os +import sys import unittest from functools import wraps @@ -7,6 +8,11 @@ datastore = "/" XI_NAMESPACE = "http://www.w3.org/2001/XInclude" XI = "{%s}" % XI_NAMESPACE +if sys.hexversion >= 0x03000000: + inPy3k = True +else: + inPy3k = False + try: from django.core.management import setup_environ has_django = True @@ -29,6 +35,10 @@ except ImportError: calls """ return (args, kwargs) +if inPy3k: + builtins = "builtins" +else: + builtins = "__builtin__" if hasattr(unittest.TestCase, "assertItemsEqual"): TestCase = unittest.TestCase -- cgit v1.2.3-1-g7c22