Skip to content
Snippets Groups Projects
Commit ac8c4b67 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

fix tests

parent 6d515d7c
No related branches found
No related tags found
No related merge requests found
# Auto detect text files and perform LF normalization
* text=auto
*.sh text eol=lf
# Custom for Visual Studio
*.cs diff=csharp
......
......@@ -7,6 +7,9 @@ RUN pip install nose2 mock coverage
ADD satella /app/satella
ADD tests /app/tests
ADD tests/test_docker.sh /test_docker.sh
RUN chmod ugo+x /test_docker.sh
WORKDIR /app
CMD ["coverage", "run", "--multiprocessing", "-m", "nose2", "-vv"]
CMD ["/test_docker.sh"]
......@@ -29,12 +29,16 @@ def parallel_for(cursor, query: tp.Union[tp.List[str], str, 'Statement', tp.List
:param query: base query or a list of queries, if a different one is to be used
:param arguments: iterable yielding arguments to use in execute_async
"""
from cassandra.query import Statement
try:
from cassandra.query import Statement
query_classes = (str, Statement)
except ImportError:
query_classes = str
if isinstance(query, (str, Statement)):
if isinstance(query, query_classes):
query = itertools.repeat(query)
futures = []
futures = []
for query, args in zip(query, arguments):
if args is None:
future = cursor.execute_async(query)
......
import signal
from satella.time import sleep
import typing as tp
from satella.time import sleep
end = False
......
#!/bin/bash
set -e
coverage run --parallel-mode -m nose2 -vv
coverage combine
coverage report
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment