forked from AmbaPant/mantid
-
Notifications
You must be signed in to change notification settings - Fork 1
/
TestWorkspaceGroupProperty.py
38 lines (29 loc) · 1.33 KB
/
TestWorkspaceGroupProperty.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
#pylint: disable=no-init,invalid-name
from mantid.kernel import *
from mantid.api import *
class TestWorkspaceGroupProperty(PythonAlgorithm):
"""
"""
def category(self):
return "Workflow\\Testing"
def name(self):
return "WorkspaceGroupProperty"
def summary(self):
return "Use only for testing"
def PyInit(self):
self.declareProperty(WorkspaceGroupProperty("InputWorkspace", "", Direction.Input),
doc="Group workspace that automatically includes all members.")
self.declareProperty(MatrixWorkspaceProperty("InputWorkspace2", "", Direction.Input),
doc="Another group workspace that automatically includes all members.")
def PyExec(self):
ws = self.getProperty("InputWorkspace").value
logger.notice("Input type: %s" % str(type(ws)))
ws2 = self.getProperty("InputWorkspace2").value
logger.notice("Input type: %s" % str(type(ws2)))
AlgorithmFactory.subscribe(TestWorkspaceGroupProperty)