
import pytest


def pytest_addoption(parser):
    group = parser.getgroup('{{cookiecutter.plugin_name}}')
    group.addoption(
        '--foo',
        action='store',
        dest='foo',
        help='Set the value for the fixture "bar".'
    )


@pytest.fixture
def bar(request):
    return request.config.option.foo


import pytest


def pytest_addoption(parser):
    group = parser.getgroup('{{cookiecutter.plugin_name}}')
    group.addoption(
        '--foo',
        action='store',
        dest='foo',
        default={{cookiecutter.year}},
        help='Set the value for the fixture "bar".'
    )


@pytest.fixture
def bar(request):
    return request.config.option.foo

Add a default to the foo option
Add a default to the foo option

  
  import pytest
  
  
  def pytest_addoption(parser):
      group = parser.getgroup('{{cookiecutter.plugin_name}}')
      group.addoption(
          '--foo',
          action='store',
          dest='foo',
+         default={{cookiecutter.year}},
          help='Set the value for the fixture "bar".'
      )
  
  
  @pytest.fixture
  def bar(request):
      return request.config.option.foo
  
Add a default to the foo option
## Code Before:

import pytest


def pytest_addoption(parser):
    group = parser.getgroup('{{cookiecutter.plugin_name}}')
    group.addoption(
        '--foo',
        action='store',
        dest='foo',
        help='Set the value for the fixture "bar".'
    )


@pytest.fixture
def bar(request):
    return request.config.option.foo

## Instruction:
Add a default to the foo option
## Code After:

import pytest


def pytest_addoption(parser):
    group = parser.getgroup('{{cookiecutter.plugin_name}}')
    group.addoption(
        '--foo',
        action='store',
        dest='foo',
        default={{cookiecutter.year}},
        help='Set the value for the fixture "bar".'
    )


@pytest.fixture
def bar(request):
    return request.config.option.foo
