Skip to content

Commit

Permalink
Replace deprecated yield_fixture with equivalent to silence warning (g…
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanmetzman authored Aug 5, 2021
1 parent 229b225 commit 77c7ab4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@


# Give this a short name since it is a fixture.
@pytest.yield_fixture
@pytest.fixture
def db(): # pylint: disable=invalid-name
"""Connect to the SQLite database and create all the expected tables."""
db_utils.initialize()
Expand All @@ -61,7 +61,7 @@ def set_sqlite_pragma(connection, _):
cursor.close()


@pytest.yield_fixture
@pytest.fixture
def environ():
"""Patch environment."""
# TODO(metzman): Make sure this is used by all tests that modify the
Expand Down
2 changes: 1 addition & 1 deletion experiment/build/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def test_build_all_measurers(_, mocked_build_measurer,
assert not result


@pytest.yield_fixture
@pytest.fixture
def builder_integration(experiment):
"""Fixture for builder.py integration tests that uses an experiment fixture
and makes the number of build retries saner by default."""
Expand Down

0 comments on commit 77c7ab4

Please sign in to comment.