-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_minimal_examples.py
More file actions
62 lines (54 loc) · 2.24 KB
/
test_minimal_examples.py
File metadata and controls
62 lines (54 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import unittest
import sys
import os
# getting the name of the directory where this file is
current = os.path.dirname(os.path.realpath(__file__))
# getting the parent directory name where the current directory is
parent = os.path.dirname(current)
# adding the parent directory to the sys.path.
sys.path.append(parent)
from AstToEcoreConverter import ProjectEcoreGraph
from pyecore.resources import ResourceSet
from test_utils import check_path_exists
test_output_dir = 'test_results/minimal_examples'
class TestMinimalExamples(unittest.TestCase):
# def test_function_overwrite(self):
# """
# This test tests a Skript with 2 Functions with the same name.
# """
# repo = 'minimal_examples/function_overwrite'
# check_path_exists(repo)
# resource_set = ResourceSet()
# graph = ProjectEcoreGraph(resource_set, repo, True, test_output_dir)
# ecore_graph = graph.get_graph()
#
# def test_2_functions_without_class(self):
# """
# This test tests a Skript with 2 Functions with the same name.
# """
# repo = 'minimal_examples/2_Function_without_class'
# check_path_exists(repo)
# resource_set = ResourceSet()
# graph = ProjectEcoreGraph(resource_set, repo, True, test_output_dir)
# ecore_graph = graph.get_graph()
#
# def test_2_functions_with_class(self):
# """
# This test tests a Skript with 2 Functions with the same name.
# """
# repo = 'minimal_examples/2_Functions_with_class'
# check_path_exists(repo)
# resource_set = ResourceSet()
# graph = ProjectEcoreGraph(resource_set, repo, True, test_output_dir)
# ecore_graph = graph.get_graph()
#def test_pyinputplus(self):
"""
This test for pyinputplus as a test
Create a dir in minimal_examples named "test_pyinputplus"
use cd tests; cd minimal_examples;cd test_pyinputplus; git clone https://github.com/asweigart/pyinputplus.git
"""
#repo = 'minimal_examples/test_pyinputplus/pyinputplus'
#check_path_exists(repo)
#resource_set = ResourceSet()
#graph = ProjectEcoreGraph(resource_set, repo, True, test_output_dir)
#ecore_graph = graph.get_graph()