Skip to content

Commit

Permalink
Remove function inspection in tests
Browse files Browse the repository at this point in the history
Let's not use inspect and try to be overly smart about it. Since we're
only testing one in the meantime, it maybe better to just list down all
the rules aliases we'll have.

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
  • Loading branch information
ljvmiranda921 committed Apr 17, 2020
1 parent ae65133 commit 1a55881
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/test_rules.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-

# Import standard library
from inspect import getmembers, isfunction
from typing import Tuple, List

# Import modules
Expand All @@ -13,11 +12,9 @@
from seagull import lifeforms as lf
from seagull.rules import conway_classic

all_rules = [
fn
for name, fn in getmembers(sg.rules, predicate=isfunction)
if (not name.startswith("_") & ("life_rule" in name)) # ignore private
]

# Define all rules here
all_rules = [("conway_classic", sg.rules.conway_classic)]


@pytest.mark.parametrize("rule_name, fn", all_rules)
Expand Down

0 comments on commit 1a55881

Please sign in to comment.