示例#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__