Source code for apama.basetest

#!/usr/bin/env python3
# Copyright (c) 2018 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
# Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG

from pysys.basetest import BaseTest
from os import path


[docs]class ApamaBaseTest(BaseTest): """ A custom PySys basetest for Apama tests. """
[docs] def __init__(self, descriptor, outsubdir, runner): super(ApamaBaseTest, self).__init__(descriptor, outsubdir, runner)
[docs] def getDefaultFileEncoding(self, file, **xargs): filename, file_extension = path.splitext(file) # give first priority to super-class since in later versions of # pysys this should be configurable through other means such as # pysysproject.xml or the runner delegated = super(ApamaBaseTest, self).getDefaultFileEncoding(file, **xargs) if delegated: return delegated if file_extension in ['xml', 'yaml', 'json', 'log']: return 'utf-8' else: return None