예제 #1
0
 def test_greb_for_word_suggestion(self):
     for each_word, each_word_dict in data.MISSPELLED_WORDS.items():
         options = {'word': each_word, 'meaning': True}
         captured_output = StringIO()
         sys.stdout = captured_output
         greb.greb(**options)
         sys.stdout = sys.__stdout__
예제 #2
0
파일: test_greb.py 프로젝트: TroJan/greb
 def test_greb_for_word_suggestion(self):
     for each_word, each_word_dict in data.MISSPELLED_WORDS.items():
         options = {'word': each_word, 'meaning': True}
         captured_output = StringIO()
         sys.stdout = captured_output
         greb.greb(**options)
         sys.stdout = sys.__stdout__
예제 #3
0
파일: test_greb.py 프로젝트: TroJan/greb
    def test_write_meaning_to_file(self):

        dummy_meaning_file = os.path.join(os.getcwd(), 'test', 'dummy_meaning.json')
        options = {'word': 'awesome', 'meaning': True, 'file_path': dummy_meaning_file}
        captured_output = StringIO()
        sys.stdout = captured_output
        greb.greb(**options)
        sys.stdout = sys.__stdout__
        os.remove(dummy_meaning_file)
예제 #4
0
    def test_write_meaning_to_file(self):

        dummy_meaning_file = os.path.join(os.getcwd(), 'test',
                                          'dummy_meaning.json')
        options = {
            'word': 'awesome',
            'meaning': True,
            'file_path': dummy_meaning_file
        }
        captured_output = StringIO()
        sys.stdout = captured_output
        greb.greb(**options)
        sys.stdout = sys.__stdout__
        os.remove(dummy_meaning_file)
예제 #5
0
파일: test_greb.py 프로젝트: TroJan/greb
    def test_greb_for_complete_word(self):

        dummy_meaning_file = os.path.join(os.getcwd(), 'test', 'dummy_meaning.json')
        options = {
                    'word': 'contribution',
                    'meaning': True,
                    'sentence': True,
                    'synonym': True,
                    'antonym': True,
                    'file_path': dummy_meaning_file
                }
        captured_output = StringIO()
        sys.stdout = captured_output
        greb.greb(**options)
        sys.stdout = sys.__stdout__
        os.remove(dummy_meaning_file)
예제 #6
0
    def test_greb_for_complete_word(self):

        dummy_meaning_file = os.path.join(os.getcwd(), 'test',
                                          'dummy_meaning.json')
        options = {
            'word': 'contribution',
            'meaning': True,
            'sentence': True,
            'synonym': True,
            'antonym': True,
            'file_path': dummy_meaning_file
        }
        captured_output = StringIO()
        sys.stdout = captured_output
        greb.greb(**options)
        sys.stdout = sys.__stdout__
        os.remove(dummy_meaning_file)
예제 #7
0
파일: test_greb.py 프로젝트: TroJan/greb
 def test_greb_for_find_meaning_from_history(self):
     options = {'display_terminal': True}
     captured_output = StringIO()
     sys.stdout = captured_output
     greb.greb(**options)
     sys.stdout = sys.__stdout__
예제 #8
0
파일: test_greb.py 프로젝트: TroJan/greb
 def test_greb_for_word_of_the_day(self):
     options = {'word_of_day': True}
     captured_output = StringIO()
     sys.stdout = captured_output
     greb.greb(**options)
     sys.stdout = sys.__stdout__
예제 #9
0
파일: test_greb.py 프로젝트: TroJan/greb
 def test_greb_for_trending_words(self):
     options = {'trending_words': True}
     captured_output = StringIO()
     sys.stdout = captured_output
     greb.greb(**options)
     sys.stdout = sys.__stdout__
예제 #10
0
 def test_greb_for_find_meaning_from_history(self):
     options = {'display_terminal': True}
     captured_output = StringIO()
     sys.stdout = captured_output
     greb.greb(**options)
     sys.stdout = sys.__stdout__
예제 #11
0
 def test_greb_for_word_of_the_day(self):
     options = {'word_of_day': True}
     captured_output = StringIO()
     sys.stdout = captured_output
     greb.greb(**options)
     sys.stdout = sys.__stdout__
예제 #12
0
 def test_greb_for_trending_words(self):
     options = {'trending_words': True}
     captured_output = StringIO()
     sys.stdout = captured_output
     greb.greb(**options)
     sys.stdout = sys.__stdout__