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
07dc9e8d
Commit
07dc9e8d
authored
Dec 09, 2011
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added unit tests and script to view profiler stats.
parent
430573e3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
2 deletions
+26
-2
external/graph_drawing
external/graph_drawing
+1
-1
external/pybison
external/pybison
+1
-1
tests/test_calc.py
tests/test_calc.py
+11
-0
utils/view_profile.py
utils/view_profile.py
+13
-0
No files found.
graph_drawing
@
4d65a52b
Subproject commit
a34e48940a4eab2d44db8bdc61ff56648e2e087e
Subproject commit
4d65a52b8ba0f0ad1843cb5535a485ff372317a3
pybison
@
2ae8c15d
Subproject commit
1bd7873dfad2fabac51fab8ed978374502f09034
Subproject commit
2ae8c15dba13faba38e1a3d1a711cf6d24395a5a
tests/test_calc.py
View file @
07dc9e8d
...
...
@@ -53,6 +53,17 @@ class TestCalc(unittest.TestCase):
(
'ab(c)d'
,
N
(
'*'
,
L
(
'a'
),
L
(
'b'
),
L
(
'c'
),
L
(
'd'
))),
#('ab(c)d', N('*', L('a'), N('*', L('b'),
# N('*', L('c'), L('d'))))),
(
'ab*(c)*d'
,
N
(
'*'
,
L
(
'a'
),
L
(
'b'
),
L
(
'c'
),
L
(
'd'
))),
(
'ab*(c)^d'
,
N
(
'*'
,
L
(
'a'
),
L
(
'b'
),
N
(
'^'
,
L
(
'c'
),
L
(
'd'
)))),
]
run_expressions
(
Parser
,
expressions
)
def
test_pow_nested
(
self
):
# a^b^c = a^(b^c) != (a^b)^c
expressions
=
[
(
'a^b^c'
,
N
(
'^'
,
L
(
'a'
),
N
(
'^'
,
L
(
'b'
),
L
(
'c'
)))),
]
run_expressions
(
Parser
,
expressions
)
utils/view_profile.py
0 → 100644
View file @
07dc9e8d
#!/usr/bin/python
import
sys
from
pstats
import
Stats
s
=
Stats
(
sys
.
argv
[
1
])
for
profile
in
sys
.
argv
[
2
:]:
s
.
add
(
profile
)
s
.
sort_stats
(
'cumulative'
)
s
.
print_stats
()
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