Skip to content

Instantly share code, notes, and snippets.

@Weyzu
Created August 27, 2017 18:02
Show Gist options
  • Save Weyzu/afae5d118126cfd7d623ec5dcbf14e33 to your computer and use it in GitHub Desktop.
Save Weyzu/afae5d118126cfd7d623ec5dcbf14e33 to your computer and use it in GitHub Desktop.
def test_is_leap_year_returns_true_for_leap_years():
leap_years = [2016, 2020, 2023, 2028, 2400]
for leap_year in leap_years:
yield assert_is_leap, leap_year
def assert_is_leap(year):
assert_true(is_leap_year(year))
@nielsbom
Copy link

I don't like nose, but it does have built-in parametrization: https://docs.nose2.io/en/latest/params.html
So I'd discount that argument in your article.

@Weyzu
Copy link
Author

Weyzu commented Jan 30, 2021

Hi @nielsbom! Thank you for reading my article. :)

The article addressed nose, not nose2. Still, at the time of writing of that article (three years ago or so) nose2 was at a non-gold version of 0.6.2. My aim was to only consider production-ready solutions that we in the company could then vouch for.

@nielsbom
Copy link

Hey! Thanks for responding!

You're right! And I didn't know nose2 wasn't "ready" for serious work. Seems they're currently still at 0.10.0 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment