#NEWLINE# def TestData( parent = None , source = None , include_suites = [ ] , warn_on_skipped = False ) : #NEWLINE# #INDENT# 'Parses a file or directory to a corresponding model object.\n\n    :param parent: (optional) parent to be used in creation of the model object.\n    :param source: path where test data is read from.\n    :returns: :class:`~.model.TestDataDirectory`  if `source` is a directory,\n        :class:`~.model.TestCaseFile` otherwise.\n    ' #NEWLINE# if os . path . isdir ( source ) : #NEWLINE# #INDENT# return TestDataDirectory ( parent , source ) . populate ( include_suites , warn_on_skipped ) #NEWLINE# #UNINDENT# return TestCaseFile ( parent , source ) . populate ( )