Added external graph_drawing submodule.

parent ac56e741
[submodule "external/pybison"] [submodule "external/pybison"]
path = external/pybison path = external/pybison
url = git@kompiler.org:python/pybison url = git@kompiler.org:python/pybison
[submodule "external/graph_drawing"]
path = external/graph_drawing
url = git@kompiler.org:python/graph_drawing
graph_drawing @ 1d05417a
Subproject commit 1d05417ac83c39ec3a75486ee842e8195565d75a
...@@ -228,3 +228,6 @@ class Parser(BisonParser): ...@@ -228,3 +228,6 @@ class Parser(BisonParser):
if __name__ == '__main__': if __name__ == '__main__':
p = Parser(verbose=0, keepfiles=1, interactive=1) p = Parser(verbose=0, keepfiles=1, interactive=1)
p.run(debug=0) p.run(debug=0)
# Clear the line, when the shell exits.
print
TESTS=$(wildcard tests/test_*.py) TESTS=$(wildcard tests/test_*.py)
COVERAGE_OUTPUT_DIR := coverage COVERAGE_OUTPUT_DIR := coverage
OMIT := --omit /usr/share/pyshared/*,/usr/lib64/portage/* OMIT := --omit /usr/share/pyshared/*
ifeq ($(findstring python-coverage,$(wildcard /usr/bin/*)), python-coverage) ifeq ($(findstring python-coverage,$(wildcard /usr/bin/*)), python-coverage)
COVERAGE=/usr/bin/python-coverage COVERAGE=/usr/bin/python-coverage
......
...@@ -27,8 +27,8 @@ class TestCalc(unittest.TestCase): ...@@ -27,8 +27,8 @@ class TestCalc(unittest.TestCase):
def test_infinity(self): def test_infinity(self):
expressions = [('2^3000', 2**3000), expressions = [('2^3000', 2**3000),
('2^-3000', 0.0), ('2^-3000', 0.0)]
('2^99999999999', None), # ('2^99999999999', None),
('2^-99999999999', 0.0)] # ('2^-99999999999', 0.0)]
run_expressions(expressions, fail=False) run_expressions(expressions)
...@@ -13,8 +13,12 @@ class TestVariables(unittest.TestCase): ...@@ -13,8 +13,12 @@ class TestVariables(unittest.TestCase):
pass pass
def test_addition(self): def test_addition(self):
expressions = [('5 + 5', 5 + 5)]
run_expressions(expressions)
def test_addition_of_one_term(self):
a = Symbol('a') a = Symbol('a')
expressions = [('a + 5', a + 5)] expressions = [('a + 5', 5 + a)]
run_expressions(expressions) run_expressions(expressions)
def test_addition_of_two_terms(self): def test_addition_of_two_terms(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment