From bcda5301706c2ff1744e70ca354ef29f60676110 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Mon, 2 Feb 2015 14:54:28 -0800 Subject: [PATCH] take advantage of absolute_import to simplify import statements --- encode_submission/test_ucsc_gather.py | 4 +++- htsworkflow/pipelines/test/test_alignment_free.py | 1 + htsworkflow/pipelines/test/test_extract_results.py | 3 ++- htsworkflow/pipelines/test/test_run_xml.py | 4 +++- htsworkflow/pipelines/test/test_runfolder026.py | 3 ++- htsworkflow/pipelines/test/test_runfolder110.py | 3 ++- htsworkflow/pipelines/test/test_runfolder_casava_1_7.py | 3 ++- htsworkflow/pipelines/test/test_runfolder_ipar100.py | 3 ++- htsworkflow/pipelines/test/test_runfolder_ipar130.py | 3 ++- htsworkflow/pipelines/test/test_runfolder_pair.py | 3 ++- htsworkflow/pipelines/test/test_runfolder_rta.py | 3 ++- htsworkflow/pipelines/test/test_runfolder_rta160.py | 3 ++- htsworkflow/pipelines/test/test_runfolder_rta180.py | 3 ++- htsworkflow/pipelines/test/test_runfolder_rta1_12.py | 3 ++- htsworkflow/pipelines/test/test_summary.py | 4 +++- htsworkflow/submission/test/test_results.py | 3 ++- 16 files changed, 34 insertions(+), 15 deletions(-) diff --git a/encode_submission/test_ucsc_gather.py b/encode_submission/test_ucsc_gather.py index 162f56a..9baf160 100644 --- a/encode_submission/test_ucsc_gather.py +++ b/encode_submission/test_ucsc_gather.py @@ -1,6 +1,8 @@ +from __future__ import absolute_import + from unittest import TestCase, TestSuite, defaultTestLoader -import ucsc_gather +from . import ucsc_gather class testUCSCGather(TestCase): pass diff --git a/htsworkflow/pipelines/test/test_alignment_free.py b/htsworkflow/pipelines/test/test_alignment_free.py index ea6e2de..adbe33a 100644 --- a/htsworkflow/pipelines/test/test_alignment_free.py +++ b/htsworkflow/pipelines/test/test_alignment_free.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import absolute_import from datetime import datetime, date import os diff --git a/htsworkflow/pipelines/test/test_extract_results.py b/htsworkflow/pipelines/test/test_extract_results.py index 29ab3fd..0d96a45 100644 --- a/htsworkflow/pipelines/test/test_extract_results.py +++ b/htsworkflow/pipelines/test/test_extract_results.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import absolute_import from datetime import datetime, date import logging @@ -15,7 +16,7 @@ from htsworkflow.pipelines import gerald from htsworkflow.pipelines import runfolder from htsworkflow.pipelines import ElementTree -from htsworkflow.pipelines.test.simulate_runfolder import * +from .simulate_runfolder import * logging.basicConfig(level=logging.ERROR) diff --git a/htsworkflow/pipelines/test/test_run_xml.py b/htsworkflow/pipelines/test/test_run_xml.py index 9ef8dd0..b311df2 100644 --- a/htsworkflow/pipelines/test/test_run_xml.py +++ b/htsworkflow/pipelines/test/test_run_xml.py @@ -1,8 +1,10 @@ +from __future__ import absolute_import + import os from unittest import TestCase from six.moves import StringIO -from simulate_runfolder import TESTDATA_DIR +from .simulate_runfolder import TESTDATA_DIR from htsworkflow.pipelines.runfolder import load_pipeline_run_xml from htsworkflow.pipelines.eland import SampleKey diff --git a/htsworkflow/pipelines/test/test_runfolder026.py b/htsworkflow/pipelines/test/test_runfolder026.py index fe52a62..dcdd365 100644 --- a/htsworkflow/pipelines/test/test_runfolder026.py +++ b/htsworkflow/pipelines/test/test_runfolder026.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import absolute_import from datetime import datetime, date import os @@ -12,7 +13,7 @@ from htsworkflow.pipelines import gerald from htsworkflow.pipelines import runfolder from htsworkflow.pipelines import ElementTree -from htsworkflow.pipelines.test.simulate_runfolder import * +from .simulate_runfolder import * def make_summary_htm(gerald_dir): diff --git a/htsworkflow/pipelines/test/test_runfolder110.py b/htsworkflow/pipelines/test/test_runfolder110.py index bc2b3a6..266fcfd 100644 --- a/htsworkflow/pipelines/test/test_runfolder110.py +++ b/htsworkflow/pipelines/test/test_runfolder110.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import absolute_import from datetime import datetime, date import os @@ -12,7 +13,7 @@ from htsworkflow.pipelines import gerald from htsworkflow.pipelines import runfolder from htsworkflow.pipelines import ElementTree -from htsworkflow.pipelines.test.simulate_runfolder import * +from .simulate_runfolder import * def make_runfolder(obj=None): diff --git a/htsworkflow/pipelines/test/test_runfolder_casava_1_7.py b/htsworkflow/pipelines/test/test_runfolder_casava_1_7.py index 9936420..bb9ae5a 100644 --- a/htsworkflow/pipelines/test/test_runfolder_casava_1_7.py +++ b/htsworkflow/pipelines/test/test_runfolder_casava_1_7.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import absolute_import from datetime import datetime, date import glob @@ -15,7 +16,7 @@ from htsworkflow.pipelines import runfolder from htsworkflow.pipelines import srf from htsworkflow.pipelines import ElementTree -from htsworkflow.pipelines.test.simulate_runfolder import * +from .simulate_runfolder import * FCID = 'AA01AAABXX' RUN_NAME = '110420_SN787_0069_%s' %( FCID,) diff --git a/htsworkflow/pipelines/test/test_runfolder_ipar100.py b/htsworkflow/pipelines/test/test_runfolder_ipar100.py index 9de3653..054fbc7 100644 --- a/htsworkflow/pipelines/test/test_runfolder_ipar100.py +++ b/htsworkflow/pipelines/test/test_runfolder_ipar100.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import absolute_import from datetime import datetime, date import os @@ -12,7 +13,7 @@ from htsworkflow.pipelines import gerald from htsworkflow.pipelines import runfolder from htsworkflow.pipelines import ElementTree -from htsworkflow.pipelines.test.simulate_runfolder import * +from .simulate_runfolder import * def make_runfolder(obj=None): diff --git a/htsworkflow/pipelines/test/test_runfolder_ipar130.py b/htsworkflow/pipelines/test/test_runfolder_ipar130.py index 366f588..5fe6221 100644 --- a/htsworkflow/pipelines/test/test_runfolder_ipar130.py +++ b/htsworkflow/pipelines/test/test_runfolder_ipar130.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import absolute_import from datetime import datetime, date import os @@ -13,7 +14,7 @@ from htsworkflow.pipelines import gerald from htsworkflow.pipelines import runfolder from htsworkflow.pipelines import ElementTree -from htsworkflow.pipelines.test.simulate_runfolder import * +from .simulate_runfolder import * def make_runfolder(obj=None): diff --git a/htsworkflow/pipelines/test/test_runfolder_pair.py b/htsworkflow/pipelines/test/test_runfolder_pair.py index 355765e..4f4976e 100644 --- a/htsworkflow/pipelines/test/test_runfolder_pair.py +++ b/htsworkflow/pipelines/test/test_runfolder_pair.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import absolute_import from datetime import datetime, date import os @@ -13,7 +14,7 @@ from htsworkflow.pipelines.eland import SampleKey from htsworkflow.pipelines import runfolder from htsworkflow.pipelines import ElementTree -from htsworkflow.pipelines.test.simulate_runfolder import * +from .simulate_runfolder import * def make_runfolder(obj=None): diff --git a/htsworkflow/pipelines/test/test_runfolder_rta.py b/htsworkflow/pipelines/test/test_runfolder_rta.py index 9c2a3d1..371a49b 100644 --- a/htsworkflow/pipelines/test/test_runfolder_rta.py +++ b/htsworkflow/pipelines/test/test_runfolder_rta.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import absolute_import from datetime import datetime, date import os @@ -14,7 +15,7 @@ from htsworkflow.pipelines import runfolder from htsworkflow.pipelines.samplekey import SampleKey from htsworkflow.pipelines import ElementTree -from htsworkflow.pipelines.test.simulate_runfolder import * +from .simulate_runfolder import * def make_runfolder(obj=None): diff --git a/htsworkflow/pipelines/test/test_runfolder_rta160.py b/htsworkflow/pipelines/test/test_runfolder_rta160.py index 19b0cfa..621f32d 100644 --- a/htsworkflow/pipelines/test/test_runfolder_rta160.py +++ b/htsworkflow/pipelines/test/test_runfolder_rta160.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import absolute_import from datetime import datetime, date import os @@ -14,7 +15,7 @@ from htsworkflow.pipelines import runfolder from htsworkflow.pipelines.samplekey import SampleKey from htsworkflow.pipelines import ElementTree -from htsworkflow.pipelines.test.simulate_runfolder import * +from .simulate_runfolder import * def make_runfolder(obj=None): diff --git a/htsworkflow/pipelines/test/test_runfolder_rta180.py b/htsworkflow/pipelines/test/test_runfolder_rta180.py index 312d92f..df57cf4 100644 --- a/htsworkflow/pipelines/test/test_runfolder_rta180.py +++ b/htsworkflow/pipelines/test/test_runfolder_rta180.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import absolute_import from datetime import datetime, date import os @@ -14,7 +15,7 @@ from htsworkflow.pipelines import runfolder from htsworkflow.pipelines.samplekey import SampleKey from htsworkflow.pipelines import ElementTree -from htsworkflow.pipelines.test.simulate_runfolder import * +from .simulate_runfolder import * def make_runfolder(obj=None): diff --git a/htsworkflow/pipelines/test/test_runfolder_rta1_12.py b/htsworkflow/pipelines/test/test_runfolder_rta1_12.py index c22535b..c1a3314 100644 --- a/htsworkflow/pipelines/test/test_runfolder_rta1_12.py +++ b/htsworkflow/pipelines/test/test_runfolder_rta1_12.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import absolute_import from datetime import datetime, date import logging @@ -15,7 +16,7 @@ from htsworkflow.pipelines import gerald from htsworkflow.pipelines import runfolder from htsworkflow.pipelines import ElementTree -from htsworkflow.pipelines.test.simulate_runfolder import * +from .simulate_runfolder import * def make_runfolder(obj=None): diff --git a/htsworkflow/pipelines/test/test_summary.py b/htsworkflow/pipelines/test/test_summary.py index 835d206..98b4fd0 100644 --- a/htsworkflow/pipelines/test/test_summary.py +++ b/htsworkflow/pipelines/test/test_summary.py @@ -1,10 +1,12 @@ #!/usr/bin/env python +from __future__ import absolute_import + import os from six.moves import StringIO from unittest import TestCase from htsworkflow.pipelines import summary -from simulate_runfolder import TESTDATA_DIR +from .simulate_runfolder import TESTDATA_DIR class SummaryTests(TestCase): """Test elements of the summary file parser diff --git a/htsworkflow/submission/test/test_results.py b/htsworkflow/submission/test/test_results.py index 08bb413..a755f6c 100644 --- a/htsworkflow/submission/test/test_results.py +++ b/htsworkflow/submission/test/test_results.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import absolute_import from pprint import pprint import shutil @@ -6,7 +7,7 @@ import shutil from unittest import TestCase, defaultTestLoader from htsworkflow.submission.results import ResultMap -from submission_test_common import * +from .submission_test_common import * class TestResultMap(TestCase): def setUp(self): -- 2.30.2