Skip to content

Commit

Permalink
TST: Use pgcollections.OrderedDict for 2.6 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdill committed Aug 2, 2015
1 parent a058680 commit 4b15fa7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ install:
- pip install pytest-xdist # multi-thread py.test
- 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
- uname -a
- cat /etc/issue
Expand Down
15 changes: 10 additions & 5 deletions examples/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
from __future__ import print_function, division, absolute_import
from pyqtgraph import Qt
from examples import utils
import importlib
from . import utils
import itertools
import pytest

files = utils.buildFileList(utils.examples)
# 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)
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
for frontend in frontends.keys():
try:
Expand Down
2 changes: 1 addition & 1 deletion pyqtgraph/parametertree/SystemSolver.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from collections import OrderedDict
from ..pgcollections import OrderedDict
import numpy as np

class SystemSolver(object):
Expand Down

0 comments on commit 4b15fa7

Please sign in to comment.