summaryrefslogtreecommitdiff
path: root/tests/backtest.py
blob: 5083472185b2d1fbf34d23bd696fb281ed5ae58a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""Add things to old Pythons so I can pretend they are newer, for tests."""

# pylint: disable=redefined-builtin
# (Redefining built-in blah)
# The whole point of this file is to redefine built-ins, so shut up about it.


# No more execfile in Py3
try:
    execfile = execfile
except NameError:
    def execfile(filename, globs):
        """A Python 3 implementation of execfile."""
        with open(filename) as fobj:
            code = fobj.read()
        exec(compile(code, filename, 'exec'), globs)