Remove prints that were being called in test code.
authorDiane Trout <diane@caltech.edu>
Thu, 29 Nov 2012 00:01:04 +0000 (16:01 -0800)
committerDiane Trout <diane@caltech.edu>
Thu, 29 Nov 2012 00:01:04 +0000 (16:01 -0800)
It messes up my dots. Unfortunately the fastq validator is still
ugly. But at least its messages are a lot shorter.

There was one debugging function ls_tree in simulate_runfolder
that I renamed to print_ls_tree because I'll occasionally remember
to grep for print to find things I shouldn't commit.

encode_submission/test_encode_find.py
htsworkflow/pipelines/test/simulate_runfolder.py
htsworkflow/pipelines/test/test_eland.py
htsworkflow/pipelines/test/test_runfolder_casava_1_7.py
htsworkflow/submission/condorfastq.py
htsworkflow/submission/results.py
htsworkflow/util/test/test_makebed.py

index 6844fa4db99661aba22d6a735d812bdbe0438129..77c758547f8c89ea33838936b9e6ec47b34f7ff5 100644 (file)
@@ -12,7 +12,6 @@ from htsworkflow.util.rdfhelp import add_default_schemas, \
 from htsworkflow.util.rdfinfer import Infer
 
 SOURCE_PATH = os.path.split(os.path.abspath(__file__))[0]
-print SOURCE_PATH
 
 class TestEncodeFind(TestCase):
     def setUp(self):
index 6734b96759de9291543466f5d07a1f4adef5deaf..afa2edfe003736605761cdb459c5ba875240ae68 100644 (file)
@@ -681,7 +681,9 @@ HWI-ST0787\t102\t{lane}\t1101\t1625\t1994\t{index}\t1\tAANAATGCTACAGAGACAAAACAAA
 """.format(lane=lane, index=index_seq)
     return body
 
-def ls_tree(root):
+def print_ls_tree(root):
+    """List tree contents, useful for debugging.
+    """
     for dirpath, dirnames, filenames in os.walk(root):
         for filename in filenames:
             print os.path.join(dirpath, filename)
index 43953fcb71b87079734b37c6abd9da4716dbba77..57ad62cfc2cd309f05c14cc12e23b1ee12727ab5 100644 (file)
@@ -239,7 +239,6 @@ class ElandTests(TestCase):
         e.results[sl1] = 'Lane1'
 
         e_list = e.values()
-        print e.items()
         self.assertEqual(e_list[0], 'Lane1')
         self.assertEqual(e_list[1], 'Lane3')
         self.assertEqual(e_list[2], 'Lane5')
index ae910553bd4fde1dea0b2d5f20e4793cb159120c..c0b12b468883ca3e1a61c05359aa237047b0f68f 100644 (file)
@@ -197,7 +197,6 @@ class RunfolderTests(TestCase):
 
 
     def test_eland(self):
-        ls_tree(self.runfolder_dir)
         hg_map = {'Lambda.fa': 'Lambda.fa'}
         for i in range(1,22):
           short_name = 'chr%d.fa' % (i,)
@@ -299,8 +298,6 @@ class RunfolderTests(TestCase):
             glob.fnmatch.fnmatch("s_1_0001_qseq.txt", pattern),
             False)
 
-        print pattern
-
 
 def suite():
     from unittest2 import TestSuite, defaultTestLoader
index f78a964c978da660d88f5ac8f263cc7f54f15149..d79502d2af7052a06e871cc0520af2e056b7ec7f 100644 (file)
@@ -99,8 +99,8 @@ class CondorFastqExtract(object):
                 conversion = conversion_funcs.get(condor_type, None)
                 if conversion is None:
                     errmsg = "Unrecognized type: {0} for {1}"
-                    print errmsg.format(condor_type,
-                                        pformat(available_sources))
+                    LOGGER.error(errmsg.format(condor_type,
+                                        pformat(available_sources)))
                     continue
                 sources = available_sources.get(condor_type, None)
 
@@ -108,7 +108,7 @@ class CondorFastqExtract(object):
                     condor_entries.setdefault(condor_type, []).append(
                         conversion(sources, target_pathname))
             else:
-                print " need file", target_pathname
+                LOGGER.warn(" need file %s", target_pathname)
 
         return condor_entries
 
index ca6f1e92438ff9a7dd64042196545e6bf06129b6..c9000e41e79f3c3e2b2962a4465636cdb718c933 100644 (file)
@@ -48,7 +48,6 @@ class ResultMap(MutableMapping):
     def make_tree_from(self, source_path, destpath = None):
         """Create a tree using data files from source path.
         """
-        print source_path, destpath
         if destpath is None:
             destpath = os.getcwd()
 
@@ -62,14 +61,12 @@ class ResultMap(MutableMapping):
             source_rel_dir = os.path.join(source_path, lib_path)
             source_lib_dir = os.path.abspath(source_rel_dir)
 
-            print "source_lib_dir", source_lib_dir
             for filename in os.listdir(source_lib_dir):
                 source_pathname = os.path.join(source_lib_dir, filename)
                 target_pathname = os.path.join(lib_destination, filename)
                 if not os.path.exists(source_pathname):
                     raise IOError(
                         "{0} does not exist".format(source_pathname))
-                print target_pathname
                 if not os.path.exists(target_pathname):
                     os.symlink(source_pathname, target_pathname)
                     LOGGER.info(
index b701e08a5fec656f0705449e3b9a4352e1269d2a..af815b6644236a5df8b0c34d76e32b2342c714f8 100644 (file)
@@ -43,7 +43,6 @@ class testMakeBed(TestCase):
       out = StringIO()
 
       out = list(makebed.make_bed_from_multi_eland_generator(instream, 'name', 'desc', 'mm9_chr', 1))
-      print out
       self.failUnlessEqual(len(out), 1)