TST: Use pgcollections.OrderedDict for 2.6 compat

This commit is contained in:
Eric Dill 2015-08-02 16:46:41 -04:00
parent a0586804b7
commit 4b15fa75d5
3 changed files with 16 additions and 6 deletions

View File

@ -65,6 +65,11 @@ install:
- pip install pytest-xdist # multi-thread py.test - pip install pytest-xdist # multi-thread py.test
- pip install pytest-cov # add coverage stats - pip install pytest-cov # add coverage stats
# required for example testing on python 2.6
- if [ "${PYTHON}" == "2.6" ]; then
pip install importlib
fi;
# Debugging helpers # Debugging helpers
- uname -a - uname -a
- cat /etc/issue - cat /etc/issue

View File

@ -1,15 +1,20 @@
from __future__ import print_function, division, absolute_import from __future__ import print_function, division, absolute_import
from pyqtgraph import Qt from pyqtgraph import Qt
from examples import utils from . import utils
import importlib
import itertools import itertools
import pytest import pytest
# apparently importlib does not exist in python 2.6...
try:
import importlib
except ImportError:
# we are on python 2.6
print("If you want to test the examples, please install importlib from "
"pypi\n\npip install importlib\n\n")
pass
files = utils.buildFileList(utils.examples) files = utils.buildFileList(utils.examples)
frontends = {Qt.PYQT4: False, Qt.PYSIDE: False} frontends = {Qt.PYQT4: False, Qt.PYSIDE: False}
# frontends = {Qt.PYQT4: False, Qt.PYQT5: False, Qt.PYSIDE: False}
# sort out which of the front ends are available # sort out which of the front ends are available
for frontend in frontends.keys(): for frontend in frontends.keys():
try: try:

View File

@ -1,4 +1,4 @@
from collections import OrderedDict from ..pgcollections import OrderedDict
import numpy as np import numpy as np
class SystemSolver(object): class SystemSolver(object):