feedback_forensics.data.loader_test#

Tests for the loader module.

Module Contents#

Classes#

TestLoader

Test class for the loader module.

API#

class feedback_forensics.data.loader_test.TestLoader#

Test class for the loader module.

test_load_json_file(setup_test_data)#

Test loading JSON file.

test_convert_vote_to_string()#

Test vote conversion to string.

test_create_votes_df(setup_test_data)#

Test creating votes dataframe.

test_get_votes_df_cache(setup_test_data)#

Test votes dict with caching.

test_get_votes_df_missing_dir()#

Test getting votes dict with missing directory.

test_get_votes_df_empty_dir(tmp_path)#

Test getting votes dict with empty directory.

test_get_votes_dict_from_annotated_pairs_json(setup_annotated_pairs_json)#

Test getting votes dict from AnnotatedPairs JSON.

test_get_votes_dict_from_annotated_pairs_json_missing_pref(setup_annotated_pairs_json)#

Test getting votes dict from AnnotatedPairs JSON with missing preferences.

test_get_votes_dict_from_annotated_pairs_json_with_metadata(setup_annotated_pairs_json)#

Test getting votes dict from AnnotatedPairs JSON with metadata.

test_get_votes_dict_from_annotated_pairs_json_v2(setup_annotated_pairs_json_v2)#

Test getting votes dict from AnnotatedPairs JSON with format v2.0.

test_model_annotators(setup_annotated_pairs_json_v2)#

Test adding model annotators to votes dict.