Skip to content

Instantly share code, notes, and snippets.

@SebDeclercq
Created January 13, 2019 16:32
Show Gist options
  • Select an option

  • Save SebDeclercq/b33118d6a4f205987c3e03a47d87e480 to your computer and use it in GitHub Desktop.

Select an option

Save SebDeclercq/b33118d6a4f205987c3e03a47d87e480 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import time
import pytest
from app.Simple import Simple
@pytest.fixture()
def var() -> None:
return Simple(azerty=1, uiop=2)
@pytest.fixture(scope='class', autouse=True)
def timer() -> None:
start = time.time()
yield
end = time.time()
print(f'\n{end - start:.2f} sec.')
class TestSimple:
def test_001(self, var: Simple) -> None:
assert var.times_3() == 9
def test_002(self, var: Simple) -> None:
assert var.azerty == 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment