Question
How can I import helper functions in test files without creating packages in the test directory?
Contex
To access a method from different modules without creating packages, and have that function operate as a helper function I found the following helpful:
conftest.py:
@pytest.fixture
def compare_test_vs_actual():
def a_function(test, actual):
print(test, actual)
return a_function
test_file.py:
def test_service_command_add(compare_test_vs_actual):
compare_test_vs_actual("hello", "world")