Skip to content

Commit 0d19b04

Browse files
chekunkovvshlapakov
authored andcommitted
move test options configuration to tests root
otherwise `pytest --ignore-cassettes tests` doesn't work
1 parent 59fe99c commit 0d19b04

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

tests/conftest.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# -*- coding: utf-8 -*-
2+
3+
4+
def pytest_addoption(parser):
5+
parser.addoption(
6+
"--update-cassettes", action="store_true", default=False,
7+
help="test with real services rewriting existing vcr cassettes")
8+
parser.addoption(
9+
"--ignore-cassettes", action="store_true", default=False,
10+
help="test with real services skipping existing vcr cassettes")

tests/hubstorage/conftest.py

-9
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,6 @@ def deserialize(self, cassette_string):
4747
my_vcr.serializer = 'gz'
4848

4949

50-
def pytest_addoption(parser):
51-
parser.addoption(
52-
"--update-cassettes", action="store_true", default=False,
53-
help="test with real services rewriting existing vcr cassettes")
54-
parser.addoption(
55-
"--ignore-cassettes", action="store_true", default=False,
56-
help="test with real services skipping existing vcr cassettes")
57-
58-
5950
def pytest_configure(config):
6051
if config.option.update_cassettes:
6152
# there's vcr `all` mode to update cassettes but it doesn't delete

0 commit comments

Comments
 (0)