Skip to content

Commit

Permalink
Run py2 tests without fastcache (#42)
Browse files Browse the repository at this point in the history
* Run py2 tests without fastcache

* Fix _cache_it fallback
  • Loading branch information
bjodah authored Oct 27, 2018
1 parent d364206 commit 27bea37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pyneqsys/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@
warnings.warn("Could not import 'fastcache' (look in PyPI), "
"solving of ConditionalNeqSys may be slower.")

class _cache_it:
def __init__(self, *args, **kwargs):
pass

def __call__(self, fun):
return fun
def _cache_it(fun):
return fun
else:
_cache_it = lambda f: clru_cache(maxsize=LRU_CACHE_SIZE)(f)
else:
Expand Down
2 changes: 2 additions & 0 deletions scripts/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ python2 setup.py sdist # test pip installable sdist (checks MANIFEST.in)
python2 -m pip install --user -e .[all] pysym pykinsol
python3 -m pip install --user -e .[all] pysym pykinsol
PYTHONPATH=$(pwd) PYTHON=python2 ./scripts/run_tests.sh
python2 -m pip uninstall -y fastcache
PYTHONPATH=$(pwd) PYTHON=python2 ./scripts/run_tests.sh
PYTHONPATH=$(pwd) PYTHON=python3 ./scripts/run_tests.sh --cov $PKG_NAME --cov-report html
./scripts/coverage_badge.py htmlcov/ htmlcov/coverage.svg
! grep "DO-NOT-MERGE!" -R . --exclude ci.sh
Expand Down

0 comments on commit 27bea37

Please sign in to comment.