Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

Commit

Permalink
turn a fixture tree() into a function mk_tree() for pytest 4
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed Nov 18, 2018
1 parent b80e253 commit e56c86d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tests/unit/selection/modules/test_with_count_combination.py
Expand Up @@ -17,8 +17,7 @@ def __call__(self, event): pass
def end(self): pass

##__________________________________________________________________||
@pytest.fixture()
def tree():
def mk_tree():
# all0 - all1 --- all2 --- sel1
# | +- sel2
# +- not1 --- any1 --- all3 --- sel3
Expand Down Expand Up @@ -65,7 +64,9 @@ def tree():
)

##__________________________________________________________________||
def test_combination(tree):
def test_combination():

tree = mk_tree()

all0 = tree['alls'][0]
sels = tree['sels']
Expand Down Expand Up @@ -112,11 +113,11 @@ def test_merge():
# deep.copy() is not used because it will be difficult to access
# to copied sels

tree0 = tree()
tree0 = mk_tree()
all0 = tree0['alls'][0]

tree0_copy1 = tree()
tree0_copy2 = tree()
tree0_copy1 = mk_tree()
tree0_copy2 = mk_tree()

all0_copy1 = tree0_copy1['alls'][0]
all0_copy2 = tree0_copy2['alls'][0]
Expand Down

0 comments on commit e56c86d

Please sign in to comment.