Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
trs
Commits
9bb7dede
Commit
9bb7dede
authored
Dec 12, 2011
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed warning: "_POSIX_C_SOURCE" redefined and removed old tests.
parent
4ffbcb2c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
28 deletions
+4
-28
src/parser.py
src/parser.py
+4
-1
tests/test_variables.py
tests/test_variables.py
+0
-27
No files found.
src/parser.py
View file @
9bb7dede
...
...
@@ -310,8 +310,11 @@ class Parser(BisonParser):
# raw lex script, verbatim here
# -----------------------------------------
lexscript
=
r"""
%{
%
top
{
#include "Python.h"
}
%{
#define YYSTYPE void *
#include "tokens.h"
extern void *py_parser;
...
...
tests/test_variables.py
deleted
100644 → 0
View file @
4ffbcb2c
import
unittest
from
src.calc
import
Parser
from
tests.parser
import
run_expressions
from
sympy
import
Symbol
,
symbols
class
TestVariables
(
unittest
.
TestCase
):
def
test_addition
(
self
):
expressions
=
[(
'5 + 5'
,
5
+
5
)]
run_expressions
(
Parser
,
expressions
)
def
test_addition_of_one_term
(
self
):
a
=
Symbol
(
'a'
)
expressions
=
[(
'a + 5'
,
5
+
a
)]
run_expressions
(
Parser
,
expressions
)
def
test_addition_of_two_terms
(
self
):
a
,
b
=
symbols
(
'a,b'
)
expressions
=
[(
'4*a + 5*b'
,
4
*
a
+
5
*
b
)]
run_expressions
(
Parser
,
expressions
)
#def test_short_addition_of_two_terms(self):
# a, b = symbols('a,b')
# expressions = [('4a + 5b', 4.0*a + 5.0*b)]
# run_expressions(expressions, verbose=1)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment