===================================================================================== test session starts =====================================================================================
platform linux -- Python 3.7.12, pytest-7.1.0, pluggy-1.0.0 -- /home/mobileye/harelw/.conda/envs/pytest-dsb-env/bin/python3.7
cachedir: .pytest_cache
rootdir: /home/mobileye/harelw/repos-github/pytest-patterns, configfile: setup.cfg
plugins: cases-3.6.10, harvest-1.10.3
collected 13 items
data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=1-anscombes_quartet-id=1] ERROR [ 7%]
data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=1-anscombes_quartet-id=2] ERROR [ 15%]
data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=1-anscombes_quartet-id=3] ERROR [ 23%]
data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=1-anscombes_quartet-id=4] ERROR [ 30%]
data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=1-csvfile-v-shape] ERROR [ 38%]
data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=1-csvfile-constant-1] ERROR [ 46%]
data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=2-anscombes_quartet-id=1] ERROR [ 53%]
data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=2-anscombes_quartet-id=2] ERROR [ 61%]
data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=2-anscombes_quartet-id=3] ERROR [ 69%]
data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=2-anscombes_quartet-id=4] ERROR [ 76%]
data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=2-csvfile-v-shape] ERROR [ 84%]
data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=2-csvfile-constant-1] ERROR [ 92%]
data_science_benchmark/test_polyfit.py::test_synthesis FAILED [100%]
=========================================================================================== ERRORS ============================================================================================
__________________________________________________________ ERROR at setup of test_poly_fit[polyfit-degree=1-anscombes_quartet-id=1] ___________________________________________________________
ScopeMismatch: You tried to access the function scoped fixture dataset_data with a session scoped request object, involved factories:
pytest_patterns/data_science_benchmark/test_polyfit.py:32: def dataset(dataset_data, request)
<makefun-gen-16>:1: def dataset_data(anscombes_quartet, csvfile, request)
__________________________________________________________ ERROR at setup of test_poly_fit[polyfit-degree=1-anscombes_quartet-id=2] ___________________________________________________________
ScopeMismatch: You tried to access the function scoped fixture dataset_data with a session scoped request object, involved factories:
pytest_patterns/data_science_benchmark/test_polyfit.py:32: def dataset(dataset_data, request)
<makefun-gen-16>:1: def dataset_data(anscombes_quartet, csvfile, request)
__________________________________________________________ ERROR at setup of test_poly_fit[polyfit-degree=1-anscombes_quartet-id=3] ___________________________________________________________
ScopeMismatch: You tried to access the function scoped fixture dataset_data with a session scoped request object, involved factories:
pytest_patterns/data_science_benchmark/test_polyfit.py:32: def dataset(dataset_data, request)
<makefun-gen-16>:1: def dataset_data(anscombes_quartet, csvfile, request)
__________________________________________________________ ERROR at setup of test_poly_fit[polyfit-degree=1-anscombes_quartet-id=4] ___________________________________________________________
ScopeMismatch: You tried to access the function scoped fixture dataset_data with a session scoped request object, involved factories:
pytest_patterns/data_science_benchmark/test_polyfit.py:32: def dataset(dataset_data, request)
<makefun-gen-16>:1: def dataset_data(anscombes_quartet, csvfile, request)
______________________________________________________________ ERROR at setup of test_poly_fit[polyfit-degree=1-csvfile-v-shape] ______________________________________________________________
ScopeMismatch: You tried to access the function scoped fixture dataset_data with a session scoped request object, involved factories:
pytest_patterns/data_science_benchmark/test_polyfit.py:32: def dataset(dataset_data, request)
<makefun-gen-16>:1: def dataset_data(anscombes_quartet, csvfile, request)
____________________________________________________________ ERROR at setup of test_poly_fit[polyfit-degree=1-csvfile-constant-1] _____________________________________________________________
ScopeMismatch: You tried to access the function scoped fixture dataset_data with a session scoped request object, involved factories:
pytest_patterns/data_science_benchmark/test_polyfit.py:32: def dataset(dataset_data, request)
<makefun-gen-16>:1: def dataset_data(anscombes_quartet, csvfile, request)
__________________________________________________________ ERROR at setup of test_poly_fit[polyfit-degree=2-anscombes_quartet-id=1] ___________________________________________________________
ScopeMismatch: You tried to access the function scoped fixture dataset_data with a session scoped request object, involved factories:
pytest_patterns/data_science_benchmark/test_polyfit.py:32: def dataset(dataset_data, request)
<makefun-gen-16>:1: def dataset_data(anscombes_quartet, csvfile, request)
__________________________________________________________ ERROR at setup of test_poly_fit[polyfit-degree=2-anscombes_quartet-id=2] ___________________________________________________________
ScopeMismatch: You tried to access the function scoped fixture dataset_data with a session scoped request object, involved factories:
pytest_patterns/data_science_benchmark/test_polyfit.py:32: def dataset(dataset_data, request)
<makefun-gen-16>:1: def dataset_data(anscombes_quartet, csvfile, request)
__________________________________________________________ ERROR at setup of test_poly_fit[polyfit-degree=2-anscombes_quartet-id=3] ___________________________________________________________
ScopeMismatch: You tried to access the function scoped fixture dataset_data with a session scoped request object, involved factories:
pytest_patterns/data_science_benchmark/test_polyfit.py:32: def dataset(dataset_data, request)
<makefun-gen-16>:1: def dataset_data(anscombes_quartet, csvfile, request)
__________________________________________________________ ERROR at setup of test_poly_fit[polyfit-degree=2-anscombes_quartet-id=4] ___________________________________________________________
ScopeMismatch: You tried to access the function scoped fixture dataset_data with a session scoped request object, involved factories:
pytest_patterns/data_science_benchmark/test_polyfit.py:32: def dataset(dataset_data, request)
<makefun-gen-16>:1: def dataset_data(anscombes_quartet, csvfile, request)
______________________________________________________________ ERROR at setup of test_poly_fit[polyfit-degree=2-csvfile-v-shape] ______________________________________________________________
ScopeMismatch: You tried to access the function scoped fixture dataset_data with a session scoped request object, involved factories:
pytest_patterns/data_science_benchmark/test_polyfit.py:32: def dataset(dataset_data, request)
<makefun-gen-16>:1: def dataset_data(anscombes_quartet, csvfile, request)
____________________________________________________________ ERROR at setup of test_poly_fit[polyfit-degree=2-csvfile-constant-1] _____________________________________________________________
ScopeMismatch: You tried to access the function scoped fixture dataset_data with a session scoped request object, involved factories:
pytest_patterns/data_science_benchmark/test_polyfit.py:32: def dataset(dataset_data, request)
<makefun-gen-16>:1: def dataset_data(anscombes_quartet, csvfile, request)
========================================================================================== FAILURES ===========================================================================================
_______________________________________________________________________________________ test_synthesis ________________________________________________________________________________________
module_results_df = Empty DataFrame
Columns: []
Index: []
def test_synthesis(module_results_df):
"""
Creates the benchmark synthesis table
Note: we could do this at many other places (hook, teardown of a session-scope fixture...)
as explained in `pytest-harvest` plugin
"""
# ----------- (1) `module_results_df` contains the raw (12 rows) table -----------
# rename columns and only keep useful information
module_results_df = rename_with_checks(module_results_df, columns={'challenger_param': 'degree',
> 'dataset_param': 'dataset'})
data_science_benchmark/test_polyfit.py:75:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
df = Empty DataFrame
Columns: []
Index: [], columns = {'challenger_param': 'degree', 'dataset_param': 'dataset'}, kwargs = {}, missing = {'challenger_param', 'dataset_param'}
def rename_with_checks(df, columns, **kwargs):
"""
Same than df.rename(columns=<columns>, **kwargs) but checks that columns exist before executing.
"""
missing = set(columns.keys()).difference(set(df.columns))
if len(missing) > 0:
> raise ValueError("Missing columns: %s" % missing)
E ValueError: Missing columns: {'challenger_param', 'dataset_param'}
data_science_benchmark/test_polyfit.py:127: ValueError
=================================================================================== short test summary info ===================================================================================
FAILED data_science_benchmark/test_polyfit.py::test_synthesis - ValueError: Missing columns: {'challenger_param', 'dataset_param'}
ERROR data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=1-anscombes_quartet-id=1]
ERROR data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=1-anscombes_quartet-id=2]
ERROR data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=1-anscombes_quartet-id=3]
ERROR data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=1-anscombes_quartet-id=4]
ERROR data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=1-csvfile-v-shape]
ERROR data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=1-csvfile-constant-1]
ERROR data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=2-anscombes_quartet-id=1]
ERROR data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=2-anscombes_quartet-id=2]
ERROR data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=2-anscombes_quartet-id=3]
ERROR data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=2-anscombes_quartet-id=4]
ERROR data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=2-csvfile-v-shape]
ERROR data_science_benchmark/test_polyfit.py::test_poly_fit[polyfit-degree=2-csvfile-constant-1]
================================================================================ 1 failed, 12 errors in 0.23s =================================================================================