TestCenter Reference
TestSupport.UnitTestSupport.TestCaseWithSupportData Class Reference
Inheritance diagram for TestSupport.UnitTestSupport.TestCaseWithSupportData:

Public Member Functions

def getTestSupportDataDirectory (cls)
 
def getFileInTestSupportDataDirectory (cls, filename)
 

Detailed Description

This is a helper class that can be used instead of TestSupport.Base.getDataDirectory()
It allows you to access the Tests Data directory from a unittest, no matter whether it's wrapped in a TestCenter test
or whether you call it directly from python.
In the latter case, the Data directory is expected to be in the folder where your python TestCase is defined.
To access the folder, use self.getTestSupportDataDirectory() or self.getFileInTestSupportDataDirectory("example.txt")

E.g.:
MyTestCase
 - MyTestCase.def
 - MyTestCase.py
 - Data
  - exampleInput.txt

Definition at line 10 of file UnitTestSupport.py.

Member Function Documentation

◆ getFileInTestSupportDataDirectory()

def TestSupport.UnitTestSupport.TestCaseWithSupportData.getFileInTestSupportDataDirectory (   cls,
  filename 
)

◆ getTestSupportDataDirectory()

def TestSupport.UnitTestSupport.TestCaseWithSupportData.getTestSupportDataDirectory (   cls)

The documentation for this class was generated from the following file: