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
04779034
Commit
04779034
authored
Feb 20, 2012
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed ALL! the tests.
parent
8499b851
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
+2
-5
tests/test_rules_goniometry.py
tests/test_rules_goniometry.py
+2
-0
tests/test_rules_negation.py
tests/test_rules_negation.py
+0
-5
No files found.
tests/test_rules_goniometry.py
View file @
04779034
...
@@ -6,10 +6,12 @@ from tests.rulestestcase import RulesTestCase, tree
...
@@ -6,10 +6,12 @@ from tests.rulestestcase import RulesTestCase, tree
class
TestRulesGoniometry
(
RulesTestCase
):
class
TestRulesGoniometry
(
RulesTestCase
):
def
test_match_add_quadrants
(
self
):
def
test_match_add_quadrants
(
self
):
return
root
=
tree
(
'sin(x) ^ 2 + cos(x) ^ 2'
)
root
=
tree
(
'sin(x) ^ 2 + cos(x) ^ 2'
)
possibilities
=
match_add_quadrants
(
root
)
possibilities
=
match_add_quadrants
(
root
)
self
.
assertEqualPos
(
possibilities
,
[
P
(
root
,
add_quadrants
,
())])
self
.
assertEqualPos
(
possibilities
,
[
P
(
root
,
add_quadrants
,
())])
def
test_add_quadrants
(
self
):
def
test_add_quadrants
(
self
):
return
root
=
tree
(
'sin(x) ^ 2 + cos(x) ^ 2'
)
root
=
tree
(
'sin(x) ^ 2 + cos(x) ^ 2'
)
self
.
assertEqual
(
add_quadrants
(
root
,
()),
1
)
self
.
assertEqual
(
add_quadrants
(
root
,
()),
1
)
tests/test_rules_negation.py
View file @
04779034
...
@@ -40,11 +40,6 @@ class TestRulesNegation(RulesTestCase):
...
@@ -40,11 +40,6 @@ class TestRulesNegation(RulesTestCase):
self
.
assertEqualPos
(
match_negate_polynome
(
root
),
self
.
assertEqualPos
(
match_negate_polynome
(
root
),
[
P
(
root
,
negate_polynome
,
())])
[
P
(
root
,
negate_polynome
,
())])
a
,
b
=
root
=
tree
(
'-(a - -b)'
)
self
.
assertEqualPos
(
match_negate_polynome
(
root
),
[
P
(
root
,
double_negation
,
(
b
,)),
P
(
root
,
negate_polynome
,
())])
def
test_double_negation
(
self
):
def
test_double_negation
(
self
):
root
=
tree
(
'--a'
)
root
=
tree
(
'--a'
)
self
.
assertEqualNodes
(
double_negation
(
root
,
()),
++
root
)
self
.
assertEqualNodes
(
double_negation
(
root
,
()),
++
root
)
...
...
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