예제 #1
0
 def test_cmp_filepair_different_files(self):
     """cmp_filepair flags mismatch between differing files
     """
     # Make two different files and compare them
     f1 = TestUtils.make_file('test_file1',"Lorum ipsum",basedir=self.wd)
     f2 = TestUtils.make_file('test_file2',"lorum ipsum",basedir=self.wd)
     result = cmp_filepair((f1,f2))
     self.assertEqual(result.status,Md5Checker.MD5_FAILED)
예제 #2
0
 def test_cmp_filepair_identical_files(self):
     """cmp_filepair matches identical files
     """
     # Make two identical files and compare them
     f1 = TestUtils.make_file('test_file1',"Lorum ipsum",basedir=self.wd)
     f2 = TestUtils.make_file('test_file2',"Lorum ipsum",basedir=self.wd)
     result = cmp_filepair((f1,f2))
     self.assertEqual(result.status,Md5Checker.MD5_OK)
 def setUp(self):
     # Make an example directory with sample files
     # structured as for SOLiD data
     self.d = TestUtils.make_dir()
     # Add files
     for f in SOLID_FILES.split():
         TestUtils.make_file(f,"lorem ipsum",basedir=self.d)
     # Make an example QC dir
     self.qc_dir = TestUtils.make_sub_dir(self.d,'qc')
     for f in SOLID_QC_FILES.split():
         TestUtils.make_file(f,"lorem ipsum",basedir=self.qc_dir)
예제 #4
0
 def setUp(self):
     # Make an example directory with sample files
     # structured as for SOLiD data
     self.d = TestUtils.make_dir()
     # Add files
     for f in SOLID_FILES.split():
         TestUtils.make_file(f, "lorem ipsum", basedir=self.d)
     # Make an example QC dir
     self.qc_dir = TestUtils.make_sub_dir(self.d, 'qc')
     for f in SOLID_QC_FILES.split():
         TestUtils.make_file(f, "lorem ipsum", basedir=self.qc_dir)
 def setUp(self):
     # Make an example directory with sample files
     # structured as for Illumina data
     self.d = TestUtils.make_dir()
     # Add fastq files
     self.fastq_dir = TestUtils.make_sub_dir(self.d,'fastqs')
     for f in ILLUMINA_FILES.split():
         TestUtils.make_file(f,"lorem ipsum",basedir=self.fastq_dir)
     # Make an example QC dir
     self.qc_dir = TestUtils.make_sub_dir(self.d,'qc')
     for f in ILLUMINA_QC_FILES.split():
         TestUtils.make_file(f,"lorem ipsum",basedir=self.qc_dir)
     for d in ILLUMINA_FASTQC_DIRS.split():
         TestUtils.make_sub_dir(self.qc_dir,d)
예제 #6
0
 def setUp(self):
     # Make an example directory with sample files
     # structured as for Illumina data
     self.d = TestUtils.make_dir()
     # Add fastq files
     self.fastq_dir = TestUtils.make_sub_dir(self.d, 'fastqs')
     for f in ILLUMINA_FILES.split():
         TestUtils.make_file(f, "lorem ipsum", basedir=self.fastq_dir)
     # Make an example QC dir
     self.qc_dir = TestUtils.make_sub_dir(self.d, 'qc')
     for f in ILLUMINA_QC_FILES.split():
         TestUtils.make_file(f, "lorem ipsum", basedir=self.qc_dir)
     for d in ILLUMINA_FASTQC_DIRS.split():
         TestUtils.make_sub_dir(self.qc_dir, d)
예제 #7
0
 def test_cmp_filepair_link_to_file(self):
     """cmp_file flags mismatch between link and file
     """
     # Make file and link
     f1 = TestUtils.make_sym_link('/dummy/file',link_name='test_link1',basedir=self.wd)
     f2 = TestUtils.make_file('test_file2',"Lorum ipsum",basedir=self.wd)
     result = cmp_filepair((f1,f2))
     self.assertEqual(result.status,Md5Checker.TYPES_DIFFER)
예제 #8
0
 def test_cmp_filepair_file_to_link(self):
     """cmp_file flags mismatch between file and link
     """
     # Make file and link
     f1 = TestUtils.make_file('test_file1',"Lorum ipsum",basedir=self.wd)
     f2 = TestUtils.make_sym_link('/dummy/file',link_name='test_link2',basedir=self.wd)
     result = cmp_filepair((f1,f2))
     self.assertEqual(result.status,Md5Checker.MD5_ERROR)
예제 #9
0
 def setUp(self):
     # Create a set of files to compare
     self.file1 = TestUtils.make_file(None, "This is a test file")
     self.file2 = TestUtils.make_file(None, "This is a test file")
     self.file3 = TestUtils.make_file(None, "This is another test file")
 def setUp(self):
     # Create a set of files to compare
     self.file1 = TestUtils.make_file(None,"This is a test file")
     self.file2 = TestUtils.make_file(None,"This is a test file")
     self.file3 = TestUtils.make_file(None,"This is another test file")