Created
January 13, 2019 16:32
-
-
Save SebDeclercq/b33118d6a4f205987c3e03a47d87e480 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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