Instead of passing instances of loggers (like logging.Logger
), it is sometimes better, to just create them
(logging.get_logger('logger name')
) in places, where you want to use them.
Passing is preferend only in cases, where many objects is created in short ammount of time, because getting logger is a bit slow process.
Use super().__init__(path)
in Python 3
Reason: TBA
import pytest
@pytest.mark.parametrize("test_input,expected", [
("3+5", 8),
("2+4", 6),
("6*9", 42),
])
def test_eval(test_input, expected):
assert eval(test_input) == expected