コード例 #1
0
ファイル: utils.py プロジェクト: 150170410/easyselenium
    def __init__(self, parent, test_file_path, po_class, load_file=False):
        PyFileUI.__init__(self, parent, test_file_path, load_file)

        self.__po_class = po_class

        if not load_file:
            initial_text = self.TEST_FILE_TEMPLATE.format(
                class_name=get_class_name_from_file(test_file_path),
                url=po_class.url)
            self.txt_content.SetValue(initial_text)
コード例 #2
0
    def __init__(self, parent, test_file_path,
                 po_class, load_file=False):
        PyFileUI.__init__(self, parent, test_file_path, load_file)

        self.__po_class = po_class

        if not load_file:
            initial_text = self.TEST_FILE_TEMPLATE.format(
                class_name=get_class_name_from_file(test_file_path),
                url=po_class.url
            )
            self.txt_content.SetValue(initial_text)
コード例 #3
0
ファイル: utils_test.py プロジェクト: 150170410/easyselenium
    def test_get_class_name_from_file(self):
        class_name = get_class_name_from_file('my_test.py')
        self.assertEqual(class_name, 'MyTest')

        class_name = get_class_name_from_file('/tmp/my_test.py')
        self.assertEqual(class_name, 'MyTest')