def test_BasicDatasetProfiler():
    toy_dataset = PandasDataset({'x': [1, 2, 3]}, data_asset_name='toy_dataset')
    assert (len(toy_dataset.get_expectation_suite(suppress_warnings=True)['expectations']) == 0)
    (expectations_config, evr_config) = BasicDatasetProfiler.profile(toy_dataset)
    assert (len(toy_dataset.get_expectation_suite(suppress_warnings=True)['expectations']) > 0)
    assert (expectations_config['data_asset_name'] == 'toy_dataset')
    assert ('BasicDatasetProfiler' in expectations_config['meta'])
    assert (set(expectations_config['meta']['BasicDatasetProfiler'].keys()) == {'created_by', 'created_at'})
    assert ('notes' in expectations_config['meta'])
    assert (set(expectations_config['meta']['notes'].keys()) == {'format', 'content'})
    assert ('To add additional notes' in expectations_config['meta']['notes']['content'][0])
    added_expectations = set()
    for exp in expectations_config['expectations']:
        added_expectations.add(exp['expectation_type'])
        assert ('BasicDatasetProfiler' in exp['meta'])
        assert ('confidence' in exp['meta']['BasicDatasetProfiler'])
    expected_expectations = {'expect_table_row_count_to_be_between', 'expect_table_columns_to_match_ordered_list', 'expect_column_values_to_be_in_set', 'expect_column_unique_value_count_to_be_between', 'expect_column_proportion_of_unique_values_to_be_between', 'expect_column_values_to_not_be_null', 'expect_column_values_to_be_in_type_list', 'expect_column_values_to_be_unique'}
    assert expected_expectations.issubset(added_expectations)
def test_BasicDatasetProfiler():
    toy_dataset = PandasDataset({'x': [1, 2, 3]}, data_asset_name='toy_dataset')
    assert (len(toy_dataset.get_expectation_suite(suppress_warnings=True)['expectations']) == 0)
    (expectations_config, evr_config) = BasicDatasetProfiler.profile(toy_dataset)
    assert (len(toy_dataset.get_expectation_suite(suppress_warnings=True)['expectations']) > 0)
    assert (expectations_config['data_asset_name'] == 'toy_dataset')
    assert ('BasicDatasetProfiler' in expectations_config['meta'])
    assert (set(expectations_config['meta']['BasicDatasetProfiler'].keys()) == {'created_by', 'created_at'})
    assert ('notes' in expectations_config['meta'])
    assert (set(expectations_config['meta']['notes'].keys()) == {'format', 'content'})
    assert ('To add additional notes' in expectations_config['meta']['notes']['content'][0])
    added_expectations = set()
    for exp in expectations_config['expectations']:
        added_expectations.add(exp['expectation_type'])
        assert ('BasicDatasetProfiler' in exp['meta'])
        assert ('confidence' in exp['meta']['BasicDatasetProfiler'])
    expected_expectations = {'expect_table_row_count_to_be_between', 'expect_table_columns_to_match_ordered_list', 'expect_column_values_to_be_in_set', 'expect_column_unique_value_count_to_be_between', 'expect_column_proportion_of_unique_values_to_be_between', 'expect_column_values_to_not_be_null', 'expect_column_values_to_be_in_type_list', 'expect_column_values_to_be_unique'}
    assert expected_expectations.issubset(added_expectations)