Beispiel #1
0
 def setUp(self):
     # Make test directories
     self.empty_dir1 = TestUtils.make_dir()
     self.empty_dir2 = TestUtils.make_dir()
     self.dir1 = ExampleDirScooby()
     self.dir2 = ExampleDirScooby()
     self.dir1.create_directory()
     self.dir2.create_directory()
Beispiel #2
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)
Beispiel #3
0
 def test_cmp_filepair_identical_links(self):
     """cmp_filepair matches identical links
     """
     # Make two identical symlinks and compare them
     f1 = TestUtils.make_sym_link('/dummy/file',link_name='test_link1',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.LINKS_SAME)
Beispiel #4
0
 def test_cmp_filepair_different_links(self):
     """cmp_filepair flags mismatch between differing links
     """
     # Make two identical symlinks and compare them
     f1 = TestUtils.make_sym_link('/dummy/file1',link_name='test_link1',basedir=self.wd)
     f2 = TestUtils.make_sym_link('/dummy/file2',link_name='test_link2',basedir=self.wd)
     result = cmp_filepair((f1,f2))
     self.assertEqual(result.status,Md5Checker.LINKS_DIFFER)
 def setUp(self):
     # Make test directories
     self.empty_dir1 = TestUtils.make_dir()
     self.empty_dir2 = TestUtils.make_dir()
     self.dir1 = ExampleDirScooby()
     self.dir2 = ExampleDirScooby()
     self.dir1.create_directory()
     self.dir2.create_directory()
Beispiel #6
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)
Beispiel #7
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)
Beispiel #8
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)
Beispiel #9
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)
 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)
 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)
Beispiel #12
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 tearDown(self):
     # Remove the example dir
     TestUtils.remove_dir(self.d)
Beispiel #14
0
 def tearDown(self):
     # Remove the example dir
     TestUtils.remove_dir(self.d)
 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")
Beispiel #16
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")
Beispiel #17
0
 def setUp(self):
     # Create working directory for test files etc
     self.wd = TestUtils.make_dir()
Beispiel #18
0
 def tearDown(self):
     # Remove the container dir
     TestUtils.remove_dir(self.wd)