def test_analyzer_can_analyze_dataset(dataset_tiny_fio): azr = StackoverflowAnalyzer.read_xml(dataset_tiny_fio) azr.analyze(5, year_from=2019, year_to=2020)
def test_analyzer_can_handle_no_attr(dataset_no_attr_fio): StackoverflowAnalyzer.read_xml(dataset_no_attr_fio, check_attrib_values={"PostTypeId": "1"})
def test_analyzer_can_handle_broken_strings(dataset_broken_fio): StackoverflowAnalyzer.read_xml(dataset_broken_fio)
def test_analyzer_can_load_stopwords(stopwords_fio): azr = StackoverflowAnalyzer() azr.load_stopwords(stopwords_fio)
def test_analyzer_raises_when_no_stopwords(dataset_tiny_fio): azr = StackoverflowAnalyzer.read_xml(dataset_tiny_fio) with pytest.raises(NoStopWordsError): azr.analyze(5, year_from=2019, year_to=2020, check_stopwords=True)
def test_analyzer_can_read_from_file_check_attr(dataset_tiny_fio): StackoverflowAnalyzer.read_xml(dataset_tiny_fio, check_attrib_values={"PostTypeId": "1"})
def test_analyzer_can_read_from_file(dataset_tiny_fio): StackoverflowAnalyzer.read_xml(dataset_tiny_fio)
def test_analyzer_can_initialize(): StackoverflowAnalyzer()
def test_analyzer_can_handle_big_topn(dataset_tiny_fio, stopwords_fio): azr = StackoverflowAnalyzer.read_xml(dataset_tiny_fio) azr.analyze(100, year_from=2019, year_to=2020)
def test_analyzer_filter_stopwords(dataset_tiny_fio, stopwords_fio): azr = StackoverflowAnalyzer.read_xml(dataset_tiny_fio) azr.load_stopwords(stopwords_fio) azr.analyze(5, year_from=2019, year_to=2020, check_stopwords=True)