예제 #1
0
    def test_analyze_processed_response(self):
        for word in self.VALID_WORDS:
            analyzer = ConjunctionMorphologicalAnalyzer(word)
            analyzer.analyze()

            assert analyzer.analyze() is None
            assert analyzer.analyze() is None
예제 #2
0
    def test_analyze_word(self):
        for word in self.VALID_WORDS:
            analyzer = ConjunctionMorphologicalAnalyzer(word)
            analyzer.analyze()

            assert isinstance(analyzer.word, Conjunction)
            assert analyzer.word.content == word
예제 #3
0
    def test_analyze_processed(self):
        for word in self.VALID_WORDS:
            analyzer = ConjunctionMorphologicalAnalyzer(word)

            assert analyzer.processed is False

            analyzer.analyze()

            assert analyzer.processed is True
예제 #4
0
    def test_analyze_return_true(self):
        for word in self.VALID_WORDS:
            analyzer = ConjunctionMorphologicalAnalyzer(word)

            assert analyzer.analyze()
예제 #5
0
    def test_analyze_match(self):
        for word in self.VALID_WORDS:
            analyzer = ConjunctionMorphologicalAnalyzer(word)
            analyzer.analyze()

            assert analyzer.matches is not None
예제 #6
0
    def test_conjunctions_list(self):
        for word in ConjunctionMorphologicalAnalyzer.CONJUNCTIONS_LIST:
            analyzer = ConjunctionMorphologicalAnalyzer(word)

            assert analyzer.analyze()
예제 #7
0
    def test_invalid_analyze_word(self):
        for word in self.INVALID_WORDS:
            analyzer = ConjunctionMorphologicalAnalyzer(word)
            analyzer.analyze()

            assert analyzer.word is None
예제 #8
0
    def test_invalid_analyze(self):
        for word in self.INVALID_WORDS:
            analyzer = ConjunctionMorphologicalAnalyzer(word)
            result = analyzer.analyze()

            assert not result