Move test fixture to conftest.py
MODIFY
tests/conftest.py
tests/conftest.py
@@ -68,6 +68,14 @@ def make_test_func(args):
return test
+@pytest.fixture()
+def run_repo2docker():
+ def run_test(args):
+ return make_test_func(args)()
+ return run_test
+
+
+
class Repo2DockerTest(pytest.Function):
"""A pytest.Item for running repo2docker"""
def __init__(self, name, parent, args):

MODIFY
tests/test_editable.py
tests/test_editable.py
-import pytest
import os
import time
import re
@@ -10,13 +9,6 @@ from repo2docker.app import Repo2Docker
DIR = os.path.join(os.path.dirname(__file__), 'dockerfile', 'editable')
-@pytest.fixture(scope="module")
-def run_repo2docker():
- def run_test(args):
- return make_test_func(args)()
- return run_test
-
-
def test_editable(run_repo2docker):
"""Run a local repository in edit mode. Verify a new file has been
created afterwards"""

Move test fixture to conftest.py