import pytest

def pytest_addoption(parser):
    parser.addoption("--filter-project-name",
                     action="store",
                     default=None,
                     help="pass a project name to filter a test file to run only tests related to it")

@pytest.fixture
def filter_project_name(request):
    return request.config.getoption('--filter-project-name')

import logging
import pytest
import buildercore.config

LOG = logging.getLogger("conftest")

def pytest_addoption(parser):
    parser.addoption("--filter-project-name",
                     action="store",
                     default=None,
                     help="pass a project name to filter a test file to run only tests related to it")

@pytest.fixture
def filter_project_name(request):
    return request.config.getoption('--filter-project-name')

def pytest_runtest_setup(item):
    LOG.info("Setting up %s::%s", item.cls, item.name)

def pytest_runtest_teardown(item, nextitem):
    LOG.info("Tearing down up %s::%s", item.cls, item.name)

Add logs for test start and end
Add logs for test start and end

+ import logging
  import pytest
+ import buildercore.config
+ 
+ LOG = logging.getLogger("conftest")
  
  def pytest_addoption(parser):
      parser.addoption("--filter-project-name",
                       action="store",
                       default=None,
                       help="pass a project name to filter a test file to run only tests related to it")
  
  @pytest.fixture
  def filter_project_name(request):
      return request.config.getoption('--filter-project-name')
  
+ def pytest_runtest_setup(item):
+     LOG.info("Setting up %s::%s", item.cls, item.name)
+ 
+ def pytest_runtest_teardown(item, nextitem):
+     LOG.info("Tearing down up %s::%s", item.cls, item.name)
+ 
Add logs for test start and end
## Code Before:
import pytest

def pytest_addoption(parser):
    parser.addoption("--filter-project-name",
                     action="store",
                     default=None,
                     help="pass a project name to filter a test file to run only tests related to it")

@pytest.fixture
def filter_project_name(request):
    return request.config.getoption('--filter-project-name')

## Instruction:
Add logs for test start and end
## Code After:
import logging
import pytest
import buildercore.config

LOG = logging.getLogger("conftest")

def pytest_addoption(parser):
    parser.addoption("--filter-project-name",
                     action="store",
                     default=None,
                     help="pass a project name to filter a test file to run only tests related to it")

@pytest.fixture
def filter_project_name(request):
    return request.config.getoption('--filter-project-name')

def pytest_runtest_setup(item):
    LOG.info("Setting up %s::%s", item.cls, item.name)

def pytest_runtest_teardown(item, nextitem):
    LOG.info("Tearing down up %s::%s", item.cls, item.name)
