class_docstr: Test the Ubuntu Corpus trainer class.
class_docstr_tok: ["Test","the","Ubuntu","Corpus","trainer","class","."]
docstr: Test the extraction of text from a decompressed Ubuntu Corpus file.
docstr_tok: ["Test","the","extraction","of","text","from","a","decompressed","Ubuntu","Corpus","file","."]
code: def test_extract(self):
      """
      Test the extraction of text from a decompressed Ubuntu Corpus file.
      """
      file_object_path = self._create_test_corpus(self._get_data())
      self.trainer.extract(file_object_path)
  
      self._destroy_test_corpus()
      corpus_path = os.path.join(
          self.trainer.extracted_data_directory, "dialogs", "3"
      )
  
      self.assertTrue(
          os.path.exists(self.trainer.extracted_data_directory)
      )
      self.assertTrue(
          os.path.exists(os.path.join(corpus_path, "1.tsv"))
      )
      self.assertTrue(
          os.path.exists(os.path.join(corpus_path, "2.tsv"))
      )
  
imports: from unittest.mock import Mock
  from io import BytesIO
  import tarfile
  import os
  from tests.base_case import ChatBotTestCase
  from chatterbot.trainers import UbuntuCorpusTrainer
label_desc: Use image node_id 11 for calling the UbuntuCorpusTrainerTestCase obj's underlying member method code with example usage: obj.test_extract() without return types