Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Network Health
sbws
Commits
628d21a9
Commit
628d21a9
authored
Apr 26, 2018
by
Matt Traudt
Browse files
Switch header to one line
parent
09010c5d
Changes
3
Hide whitespace changes
Inline
Side-by-side
sbws/lib/v3bwfile.py
View file @
628d21a9
...
...
@@ -30,6 +30,6 @@ class V3BwHeader(object):
def
__str__
(
self
):
"""Return header string following spec version 1.1.0."""
frmt
=
'{timestamp}
\n
version={version}
\n
software={software}
\n
'
\
frmt
=
'{timestamp}
version={version}
software={software}
'
\
'software_version={software_version}
\n
'
return
frmt
.
format
(
**
self
.
__dict__
)
tests/core/test_generate.py
View file @
628d21a9
...
...
@@ -7,7 +7,7 @@ import logging
log
=
logging
.
getLogger
(
__name__
)
NUM_LINES_HEADER
=
4
NUM_LINES_HEADER
=
1
def
test_generate_no_dotsbws
(
tmpdir
,
caplog
,
parser
):
...
...
tests/lib/test_v3bwfile.py
View file @
628d21a9
...
...
@@ -7,7 +7,7 @@ def test_v3bwheader_str():
"""Test header str"""
timestamp
=
1524661857
header
=
V3BwHeader
(
timestamp
)
assert
str
(
header
)
==
'{}
\n
version=1.1.0
\n
software=sbws
\n
'
\
assert
str
(
header
)
==
'{}
version=1.1.0
software=sbws
'
\
'software_version=0.1.0
\n
'
.
format
(
timestamp
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment