Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AossTower
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MetObs
AossTower
Commits
c8f18830
Commit
c8f18830
authored
10 years ago
by
Bruce Flynn
Browse files
Options
Downloads
Patches
Plain Diff
Fix test for v2
parent
cfe645d9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aosstower/tests/l00/test_parser.py
+8
-3
8 additions, 3 deletions
aosstower/tests/l00/test_parser.py
with
8 additions
and
3 deletions
aosstower/tests/l00/test_parser.py
+
8
−
3
View file @
c8f18830
...
...
@@ -31,15 +31,15 @@ class ParserV0Tests(unittest.TestCase):
self
.
assertEqual
(
record
[
'
stamp
'
],
datetime
(
1970
,
1
,
1
))
class
ParserV1Tests
(
unittest
.
TestCase
):
class
ParserV1
V2
Tests
(
unittest
.
TestCase
):
line
=
(
"
1,1970,1,0000,0,976.59,5.8564,30.085,25.893,977.36,58732,
"
"
47.375,24.234,23.865,22.615,37.219,6.9222,67.398,145.2,45.581,
"
"
22.669,10.417,145.2,22.665,163.94,0,0,30.015,29.89
\n
"
)
def
_cut
(
self
):
from
aosstower.l00.parser
import
ParserV1
return
ParserV1
()
from
aosstower.l00.parser
import
ParserV1
V2
return
ParserV1
V2
()
def
test_maybe_mine
(
self
):
parser
=
self
.
_cut
()
...
...
@@ -56,3 +56,8 @@ class ParserV1Tests(unittest.TestCase):
self
.
assertIn
(
'
stamp
'
,
record
)
self
.
assertEqual
(
record
[
'
stamp
'
],
datetime
(
1970
,
1
,
1
))
def
test_record_supports_v1_and_v2
(
self
):
parser
=
self
.
_cut
()
parser
.
parse
(
self
.
line
)
parser
.
parse
(
self
.
line
.
strip
()
+
'
,999
\n
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment