1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
# coding: spec
import unittest
import pytest
@pytest.fixture()
def hi():
return "hi"
it "one", hi:
assert hi == "hi"
describe "two":
it "three", hi:
assert hi == "hi"
it "four", hi:
assert hi == "hi"
describe "five":
it "six", hi:
assert hi == "hi"
describe "seven":
__only_run_tests_in_children__ = True
it "eight", hi, expected:
assert hi == expected
it "nine", hi, expected:
assert hi == expected
describe "ten":
@pytest.fixture()
def hi(self):
return "hello"
@pytest.fixture()
def expected(self):
return "hello"
describe "eleven":
@pytest.fixture()
def hi(self):
return "yo"
@pytest.fixture()
def expected(self):
return "yo"
describe unittest.TestCase, "twelve":
it "thirteen":
assert True
|