示例#1
0
文件: test_cli.py 项目: gutobenn/MAT
 def test_remove_fileformat_specific_options(self):
     """ test metadata removal with fileformat-specific options """
     for _, dirty in self.file_list:  # can't be faster than that :/
         if dirty.endswith('pdf'):
             subprocess.call(['mat', '--low-pdf-quality', dirty])
             current_file = mat.create_class_file(dirty, False, low_pdf_quality=True)
             self.assertTrue(current_file.is_clean())
示例#2
0
文件: clitest.py 项目: rukhairy/MAT
 def test_remove_empty(self):
     """Test removal with clean files\n"""
     for clean, _ in self.file_list:
         subprocess.call(['../mat', '--add2archive', clean])
         current_file = mat.create_class_file(clean,
                                              False,
                                              add2archive=True,
                                              low_pdf_quality=True)
         self.assertTrue(current_file.is_clean())
示例#3
0
文件: clitest.py 项目: rukhairy/MAT
 def test_remove(self):
     """make sure that the cli remove all compromizing meta"""
     for _, dirty in self.file_list:
         subprocess.call(['../mat', '--add2archive', dirty])
         current_file = mat.create_class_file(dirty,
                                              False,
                                              add2archive=True,
                                              low_pdf_quality=True)
         self.assertTrue(current_file.is_clean())
示例#4
0
 def test_remove_fileformat_specific_options(self):
     """ test metadata removal with fileformat-specific options """
     for _, dirty in self.file_list:  # can't be faster than that :/
         if dirty.endswith('pdf'):
             subprocess.call(['mat', '--low-pdf-quality', dirty])
             current_file = mat.create_class_file(dirty,
                                                  False,
                                                  low_pdf_quality=True)
             self.assertTrue(current_file.is_clean())
示例#5
0
文件: clitest.py 项目: rukhairy/MAT
 def test_remove_empty(self):
     """Test removal with clean files\n"""
     for clean, _ in self.file_list:
         subprocess.call(['../mat', '--add2archive', clean])
         current_file = mat.create_class_file(clean, False, add2archive=True, low_pdf_quality=True)
         self.assertTrue(current_file.is_clean())
示例#6
0
文件: clitest.py 项目: rukhairy/MAT
 def test_remove(self):
     """make sure that the cli remove all compromizing meta"""
     for _, dirty in self.file_list:
         subprocess.call(['../mat', '--add2archive', dirty])
         current_file = mat.create_class_file(dirty, False, add2archive=True, low_pdf_quality=True)
         self.assertTrue(current_file.is_clean())