Skip to content

Instantly share code, notes, and snippets.

@zkan
Created December 16, 2018 01:58
Show Gist options
  • Save zkan/352f13923c765d31991d23f0109d816f to your computer and use it in GitHub Desktop.
Save zkan/352f13923c765d31991d23f0109d816f to your computer and use it in GitHub Desktop.
FizzBuzz test using Pytest with external plugin loading: conftest.py
import pytest
@pytest.mark.parametrize('test_input, expected', [
(3, 'Fizz'),
  (6, 'Fizz'),
  (5, 'Buzz'),
  (10, 'Buzz'),
  (15, 'FizzBuzz'),
  (30, 'FizzBuzz'),
  (2, 2),
  (7, 7),
])
def test_fizzbuzz(fizzbuzz, test_input, expected):
assert fizzbuzz.say(test_input) == expected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment