Skip to content

Commit

Permalink
Fix python 3 relative module import
Browse files Browse the repository at this point in the history
  • Loading branch information
marcvdijk committed Dec 9, 2019
1 parent 79a283d commit 636d93f
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion tests/module/module_branched_workflow_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import time
import unittest

from unittest_baseclass import UnittestPythonCompatibility
from tests.module.unittest_baseclass import UnittestPythonCompatibility
from mdstudio_workflow import Workflow, WorkflowSpec

currpath = os.path.dirname(__file__)
Expand Down
2 changes: 1 addition & 1 deletion tests/module/module_linear_workflow_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import time

from mdstudio_workflow import Workflow, WorkflowSpec
from unittest_baseclass import UnittestPythonCompatibility
from tests.module.unittest_baseclass import UnittestPythonCompatibility

currpath = os.path.dirname(__file__)
workflow_file_path = os.path.abspath(os.path.join(currpath, '../files/test-linear-workflow.jgf'))
Expand Down
5 changes: 3 additions & 2 deletions tests/module/module_mapper_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@
"""

import os
import unittest
import time

from tests.module.unittest_baseclass import UnittestPythonCompatibility

from mdstudio_workflow import Workflow, WorkflowSpec

currpath = os.path.dirname(__file__)
workflow_file_path = os.path.abspath(os.path.join(currpath, '../files/test-mapreduce-workflow.jgf'))


class TestBuildMapperWorkflow(unittest.TestCase):
class TestBuildMapperWorkflow(UnittestPythonCompatibility):
"""
Build the map-reduce workflow a shown in the file header using the default
threader PythonTask runner
Expand Down
10 changes: 6 additions & 4 deletions tests/module/module_mapreduce_workflow_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
"""

import os
import unittest
import time
import unittest

from tests.module.unittest_baseclass import UnittestPythonCompatibility

from mdstudio_workflow import Workflow, WorkflowSpec

Expand Down Expand Up @@ -66,7 +68,7 @@ def test5_final_workflow_output(self):
self.assertDictEqual(result, self.expected_output)


class TestBuildMapreduceWorkflow(unittest.TestCase):
class TestBuildMapreduceWorkflow(UnittestPythonCompatibility):
"""
Build the map-reduce workflow a shown in the file header using the default
threader PythonTask runner
Expand Down Expand Up @@ -127,7 +129,7 @@ def test4_save_workflow(self):
self.assertTrue(os.path.exists(workflow_file_path))


class TestRunMapreduceWorkflowDefault(BaseWorkflowRunnerTests, unittest.TestCase):
class TestRunMapreduceWorkflowDefault(BaseWorkflowRunnerTests, UnittestPythonCompatibility):
"""
Run the branched workflow build in TestBuildBranchedWorkflow
"""
Expand Down Expand Up @@ -174,7 +176,7 @@ def test3_run_workflow(self):
time.sleep(1)


class TestZcleanup(unittest.TestCase):
class TestZcleanup(UnittestPythonCompatibility):

@classmethod
def setUpClass(cls):
Expand Down
2 changes: 1 addition & 1 deletion tests/module/module_taskobject_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from graphit.graph_io.io_jsonschema_format import read_json_schema
from graphit.graph_exceptions import GraphitValidationError
from unittest_baseclass import UnittestPythonCompatibility
from tests.module.unittest_baseclass import UnittestPythonCompatibility

from mdstudio_workflow.workflow_task_types import WORKFLOW_ORM

Expand Down
4 changes: 2 additions & 2 deletions tests/module/module_tasktypes_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

from mdstudio_workflow import WorkflowSpec

from dummy_task_runners import task_runner
from unittest_baseclass import UnittestPythonCompatibility, STRING_TYPES
from tests.module.dummy_task_runners import task_runner
from tests.module.unittest_baseclass import UnittestPythonCompatibility, STRING_TYPES

currpath = os.path.dirname(__file__)

Expand Down
2 changes: 1 addition & 1 deletion tests/module/module_workdir_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import shutil

from mdstudio_workflow import Workflow
from unittest_baseclass import UnittestPythonCompatibility
from tests.module.unittest_baseclass import UnittestPythonCompatibility

currpath = os.path.dirname(__file__)
tmp_project_dir = os.path.abspath(os.path.join(currpath, '../files/test_project'))
Expand Down
2 changes: 1 addition & 1 deletion tests/module/module_workflow_semantics_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from mdstudio_workflow import Workflow
from mdstudio_workflow.workflow_task_types.task_base_type import edge_select_transform

from unittest_baseclass import UnittestPythonCompatibility
from tests.module.unittest_baseclass import UnittestPythonCompatibility

currpath = os.path.dirname(__file__)

Expand Down
2 changes: 1 addition & 1 deletion tests/module/module_workflowspec_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import jsonschema

from graphit.graph_io.io_pydata_format import write_pydata
from unittest_baseclass import UnittestPythonCompatibility
from tests.module.unittest_baseclass import UnittestPythonCompatibility

from mdstudio_workflow import WorkflowSpec
from mdstudio_workflow.workflow_common import WorkflowError
Expand Down

0 comments on commit 636d93f

Please sign in to comment.