Robot Framework Integrated Development Environment (RIDE)
robotdata.py
Go to the documentation of this file.
1 # Copyright 2008-2015 Nokia Networks
2 # Copyright 2016- Robot Framework Foundation
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 
16 import os
17 
18 from .. import robotapi
19 
20 
21 def NewTestCaseFile(path):
22  datafile = robotapi.TestCaseFile(source=path)
23  datafile.start_table(['Test Cases'])
24  _create_missing_directories(datafile.directory)
25  return datafile
26 
27 
29  dirname = os.path.dirname(path)
30  datafile = robotapi.TestDataDirectory(source=dirname)
31  datafile.initfile = path
33  return datafile
34 
35 
37  if not os.path.isdir(dirname):
38  os.makedirs(dirname)
The parsed test case file object.
Definition: model.py:216
The parsed test data directory object.
Definition: model.py:296
def _create_missing_directories(dirname)
Definition: robotdata.py:36