Skip to content

Instantly share code, notes, and snippets.

@zkan
Created December 16, 2018 01:56
Show Gist options
  • Save zkan/61be783285143a683d2faae6afa27b8b to your computer and use it in GitHub Desktop.
Save zkan/61be783285143a683d2faae6afa27b8b to your computer and use it in GitHub Desktop.
FizzBuzz test using Pytest with external plugin loading: conftest.py
import pytest
class FizzBuzz:
def say(self, number):
if number % 3 == 0 and number % 5 == 0:
  return 'FizzBuzz'
  elif number % 3 == 0:
  return 'Fizz'
  elif number % 5 == 0:
  return 'Buzz'
  else:
  return number
@pytest.fixture
def fizzbuzz():
f = FizzBuzz()
  return f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment