Robot Framework Integrated Development Environment (RIDE)
create_testdoc_data.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 from __future__ import print_function
4 
5 import sys
6 from os.path import abspath, dirname, join, normpath
7 import shutil
8 
9 BASE = dirname(abspath(__file__))
10 ROOT = normpath(join(BASE, '..', '..', '..', '..'))
11 DATA = [join(ROOT, 'atest', 'testdata', 'misc'), join(BASE, 'dir.suite')]
12 SRC = join(ROOT, 'src')
13 # must generate data next to testdoc.html to get relative sources correct
14 OUTPUT = join(BASE, '..', 'testdoc.js')
15 REAL_OUTPUT = join(BASE, 'testdoc.js')
16 
17 sys.path.insert(0, SRC)
18 
19 from robotide.lib.robot.testdoc import TestSuiteFactory, TestdocModelWriter
20 
21 with open(OUTPUT, 'w') as output:
22  TestdocModelWriter(output, TestSuiteFactory(DATA)).write_data()
23 
24 shutil.move(OUTPUT, REAL_OUTPUT)
25 
26 print(REAL_OUTPUT)
27 
def TestSuiteFactory(datasources, **options)
Definition: testdoc.py:140
def abspath(path, case_normalize=False)
Replacement for os.path.abspath with some enhancements and bug fixes.
Definition: robotpath.py:87
def normpath(path, case_normalize=False)
Replacement for os.path.normpath with some enhancements.
Definition: robotpath.py:68