removed repoze.lru test dependency for python 2.7

This commit is contained in:
Shay Palachy
2017-04-20 12:14:17 +03:00
parent 902aff1e7e
commit 46962a39f6
2 changed files with 3 additions and 8 deletions
-2
View File
@@ -11,8 +11,6 @@ before_install:
# coverage submission packages
- pip install codecov
install:
# Coveralls 4.0 doesn't support Python 3.2
- if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then travis_retry pip install repoze.lru; fi
- pip install ".[test]"
script: pytest --cov=pcachier
# submit coverage
+3 -6
View File
@@ -6,10 +6,6 @@ from time import sleep
from cachier import cachier
from pymongo.mongo_client import MongoClient
try:
from functools import lru_cache
except ImportError:
from repoze.lru import lru_cache
_TEST_HOST = 'ds119508.mlab.com'
_TEST_PORT = 19508
@@ -27,9 +23,10 @@ def _get_cachier_db_mongo_client():
return client
@lru_cache(2)
def _mongo_getter():
return _get_cachier_db_mongo_client()['cachier_test']['cachier_test']
if not hasattr(_mongo_getter, 'client'):
_mongo_getter.client = _get_cachier_db_mongo_client()
return _mongo_getter.client['cachier_test']['cachier_test']
# Mongo core tests