summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/pytest.ini1
-rw-r--r--testing/tests/perf/conftest.py3
-rw-r--r--testing/tests/perf/test_crypto.py3
-rw-r--r--testing/tests/perf/test_misc.py2
-rw-r--r--testing/tests/perf/test_sqlcipher.py2
-rw-r--r--testing/tests/perf/test_sync.py2
-rw-r--r--testing/tox.ini9
7 files changed, 14 insertions, 8 deletions
diff --git a/testing/pytest.ini b/testing/pytest.ini
index 39d1e1c6..eb70b67c 100644
--- a/testing/pytest.ini
+++ b/testing/pytest.ini
@@ -1,4 +1,3 @@
[pytest]
testpaths = tests
-norecursedirs = tests/perf
twisted = yes
diff --git a/testing/tests/perf/conftest.py b/testing/tests/perf/conftest.py
index 2964936b..d08ea61d 100644
--- a/testing/tests/perf/conftest.py
+++ b/testing/tests/perf/conftest.py
@@ -26,9 +26,6 @@ server.ensure_server()
def pytest_addoption(parser):
parser.addoption(
- "--couch-url", type="string", default="http://127.0.0.1:5984",
- help="the url for the couch server to be used during tests")
- parser.addoption(
"--num-docs", type="int", default=100,
help="the number of documents to use in performance tests")
diff --git a/testing/tests/perf/test_crypto.py b/testing/tests/perf/test_crypto.py
index 367c3b5b..a438ee49 100644
--- a/testing/tests/perf/test_crypto.py
+++ b/testing/tests/perf/test_crypto.py
@@ -18,6 +18,9 @@ from leap.soledad.client import _crypto
LIMIT = int(float(os.environ.get('SIZE_LIMIT', 50 * 1000 * 1000)))
+pytestmark = pytest.mark.perf
+
+
def create_doc_encryption(size):
@pytest.mark.benchmark(group="test_crypto_encrypt_doc")
def test_doc_encryption(soledad_client, benchmark, payload):
diff --git a/testing/tests/perf/test_misc.py b/testing/tests/perf/test_misc.py
index ead48adf..b45dc04e 100644
--- a/testing/tests/perf/test_misc.py
+++ b/testing/tests/perf/test_misc.py
@@ -1,5 +1,7 @@
import pytest
+pytestmark = pytest.mark.perf
+
@pytest.mark.benchmark(group="test_instance")
def test_initialization(soledad_client, benchmark):
diff --git a/testing/tests/perf/test_sqlcipher.py b/testing/tests/perf/test_sqlcipher.py
index 39c9e3ad..807af6e9 100644
--- a/testing/tests/perf/test_sqlcipher.py
+++ b/testing/tests/perf/test_sqlcipher.py
@@ -5,6 +5,8 @@ import pytest
from twisted.internet.defer import gatherResults
+pytestmark = pytest.mark.perf
+
def load_up(client, amount, payload, defer=True):
results = [client.create_doc({'content': payload}) for _ in xrange(amount)]
diff --git a/testing/tests/perf/test_sync.py b/testing/tests/perf/test_sync.py
index 1bf6cc21..9bb20389 100644
--- a/testing/tests/perf/test_sync.py
+++ b/testing/tests/perf/test_sync.py
@@ -1,5 +1,7 @@
import pytest
+pytestmark = pytest.mark.perf
+
@pytest.inlineCallbacks
def load_up(client, amount, payload):
diff --git a/testing/tox.ini b/testing/tox.ini
index d84566ca..f6470c89 100644
--- a/testing/tox.ini
+++ b/testing/tox.ini
@@ -4,10 +4,11 @@ skipsdist=True
[testenv]
basepython = python2.7
-commands = py.test --cov-report=html \
+commands = py.test -m "not perf" \
+ --cov-report=html \
--cov-report=term \
- --cov=leap.soledad \
- {posargs}
+ --cov=leap.soledad \
+ {posargs}
usedevelop = True
deps =
coverage
@@ -34,7 +35,7 @@ install_command = pip install {opts} {packages}
deps =
{[testenv]deps}
pytest-benchmark
-commands = py.test tests/perf {posargs}
+commands = py.test -m perf {posargs}
[testenv:code-check]
changedir = ..