Skip to content

Commit

Permalink
Merge pull request #22 from zivid/remove-unused-outer-name
Browse files Browse the repository at this point in the history
Removed pylint disable redefined-out-name in conftest
  • Loading branch information
trym-b authored Oct 25, 2019
2 parents 8edc053 + 1928131 commit a6e4022
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
from scripts.sample_data import download_and_extract


@pytest.fixture()
def application():
@pytest.fixture(name="application")
def application_fixture():
import zivid

with zivid.Application() as app:
yield app


@pytest.fixture(scope="session")
def sample_data_file():
@pytest.fixture(name="sample_data_file", scope="session")
def sample_data_file_fixture():
from pathlib import Path
import tempfile

Expand All @@ -21,24 +21,22 @@ def sample_data_file():
yield sample_data


@pytest.fixture()
def file_camera(application, sample_data_file): # pylint: disable=redefined-outer-name
@pytest.fixture(name="file_camera")
def file_camera_fixture(application, sample_data_file):
with application.create_file_camera(sample_data_file) as file_cam:
yield file_cam


@pytest.fixture()
def frame(
application, sample_data_file
): # pylint: disable=redefined-outer-name, unused-argument
@pytest.fixture(name="frame")
def frame_fixture(application, sample_data_file): # pylint: disable=unused-argument
import zivid

with zivid.Frame(sample_data_file) as frame:
yield frame


@pytest.fixture()
def random_settings():
@pytest.fixture(name="random_settings")
def random_settings_fixture():
import datetime
from random import randint, choice, uniform
import zivid
Expand Down Expand Up @@ -68,10 +66,9 @@ def random_settings():
yield heavily_modified_settings


@pytest.fixture()
def three_frames(
application, # pylint: disable=redefined-outer-name, unused-argument
sample_data_file, # pylint: disable=redefined-outer-name
@pytest.fixture(name="three_frames")
def three_frames_fixture(
application, sample_data_file # pylint: disable=unused-argument
):
import zivid

Expand Down

0 comments on commit a6e4022

Please sign in to comment.