Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def testInitialize(self):
"""Tests the __init__ function."""
source_type.PathSourceType(paths=[u'test'])
source_type.PathSourceType(paths=[u'test'], separator=u'\\')
def testInitialize(self):
"""Tests the __init__ function."""
source_type.PathSourceType(paths=[u'test'])
source_type.PathSourceType(paths=[u'test'], separator=u'\\')
"""Initializes a source type.
Args:
paths (Optional[str]): paths relative to the root of the file system.
separator (Optional[str]): path segment separator.
Raises:
FormatError: when paths is not set or not a list type.
"""
if not paths:
raise errors.FormatError('Missing paths value.')
if not isinstance(paths, list):
raise errors.FormatError('Invalid paths value, not a list.')
super(PathSourceType, self).__init__()
self.paths = paths
self.separator = separator