Skip to content

Commit

Permalink
Remove duplicate codes
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Dec 2, 2024
1 parent c3c9db4 commit ce3d5e8
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions tests/test_expose.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,6 @@
from plumpy.processes import Process


def validator_function(input, port):
pass


class BaseNamespaceProcess(NewLoopProcess):
@classmethod
def define(cls, spec):
super().define(spec)
spec.input('top')
spec.input('namespace.sub_one')
spec.input('namespace.sub_two')
spec.inputs['namespace'].valid_type = (int, float)
spec.inputs['namespace'].validator = validator_function


class BaseProcess(NewLoopProcess):
@classmethod
def define(cls, spec):
super().define(spec)
spec.input('a', valid_type=str, default='a')
spec.input('b', valid_type=str, default='b')
spec.inputs.dynamic = True
spec.inputs.valid_type = str


class ExposeProcess(NewLoopProcess):
@classmethod
def define(cls, spec):
super().define(spec)
spec.expose_inputs(BaseProcess, namespace='base.name.space')
spec.input('c', valid_type=int, default=1)
spec.input('d', valid_type=int, default=2)
spec.inputs.dynamic = True
spec.inputs.valid_type = int


def validator_function(input, port):
pass

Expand Down

0 comments on commit ce3d5e8

Please sign in to comment.