コード例 #1
0
ファイル: get_requirements.py プロジェクト: wjin33/moose
def _create_specification(child, name, filename):
    """
    Create and return a TestSpecificaiton object.

    Inputs:
        child[pyhit.Node]: Node containing test specification
        name: The name to apply to the specification
        filename: Location of the specification
    """
    spec = TestSpecification(name=name, filename=filename, line=child.line())
    spec.type = child.get('type').strip() if child.get(
        'type', None) is not None else None
    spec.text = child.render()
    spec.local = mooseutils.git_localpath(filename)

    # "skip" and "deleted" for creating satisfied parameter (i.e., does the test run)
    spec.skip = child.get('skip', None) is not None
    spec.deleted = child.get('deleted', None) is not None

    # Store the prerequisites, if any
    prereq = child.get('prereq', None)
    if prereq is not None:
        spec.prerequisites = set(prereq.split(' '))

    return spec
コード例 #2
0
ファイル: test_gitutils.py プロジェクト: wjin33/moose
 def testGitLocalPath(self):
     filename = os.path.abspath(__file__)
     local = mooseutils.git_localpath(filename)
     self.assertEqual(local, 'python/mooseutils/tests/test_gitutils.py')