ignoring versioneer in deepsource + retryWrites=False in MongoClient constructor

This commit is contained in:
Shay Palachy
2019-09-07 11:45:45 +03:00
parent a2ea13256e
commit b6ac1bb191
3 changed files with 19 additions and 1 deletions
+5
View File
@@ -4,3 +4,8 @@
name = "python"
enabled = true
runtime_version = "3.x.x"
exclude_patterns = [
"**/versioneer.py",
"**/_version.py"
]
+6
View File
@@ -2,6 +2,7 @@
import os
import cachier
from cachier.core import (
MAX_WORKERS_ENVAR_NAME,
DEFAULT_MAX_WORKERS,
@@ -11,6 +12,11 @@ from cachier.core import (
)
def test_information():
print("\ncachier version: ", end="")
print(cachier.__version__)
def test_max_workers():
"""Just call this function for coverage."""
try:
+8 -1
View File
@@ -12,6 +12,7 @@ except ImportError: # python 2
import Queue as queue
import pytest
import pymongo
from pymongo.mongo_client import MongoClient
from pymongo.errors import OperationFailure
@@ -25,7 +26,7 @@ _TEST_PWD = 'ZGhjO5CQESYJ69U4z65G79YG'
def _get_cachier_db_mongo_client():
client = MongoClient(host=_TEST_HOST, port=_TEST_PORT)
client = MongoClient(host=_TEST_HOST, port=_TEST_PORT, retryWrites=False)
client.cachier_test.authenticate(
name=_TEST_USERNAME,
password=_TEST_PWD,
@@ -49,6 +50,12 @@ def _test_mongetter():
# === Mongo core tests ===
def test_information():
print("\npymongo version: ", end="")
print(pymongo.__version__)
@cachier(mongetter=_test_mongetter)
def _test_mongo_caching(arg_1, arg_2):
"""Some function."""