Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bline
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Software Public
PASSOFT
bline
Commits
8585862e
Commit
8585862e
authored
3 years ago
by
Omid Hosseini
Browse files
Options
Downloads
Patches
Plain Diff
Fix failed tests
parent
9556d4c8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#1057
failed with stage
in 43 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bline/baler_addr/util.py
+2
-2
2 additions, 2 deletions
bline/baler_addr/util.py
tests/test_bline.py
+8
-7
8 additions, 7 deletions
tests/test_bline.py
with
10 additions
and
9 deletions
bline/baler_addr/util.py
+
2
−
2
View file @
8585862e
...
...
@@ -172,8 +172,8 @@ def retrieve_baler_info(ip_addr):
k
,
v
=
i
.
split
(
'
=
'
)
baler_info
[
k
]
=
v
# A line like: "Supply Voltage=12.8"
elif
len
(
find_occur
(
info
.
text
,
'
,
'
))
==
0
and
len
(
find_occur
(
info
.
text
,
'
=
'
))
==
1
:
elif
len
(
find_occur
(
info
.
text
,
'
,
'
))
==
0
\
and
len
(
find_occur
(
info
.
text
,
'
=
'
))
==
1
:
k
,
v
=
info
.
text
.
split
(
'
=
'
)
baler_info
[
k
]
=
v
# A line like: "MAC Address: F2:3F:0B:65:07:1A"
...
...
This diff is collapsed.
Click to expand it.
tests/test_bline.py
+
8
−
7
View file @
8585862e
...
...
@@ -13,10 +13,11 @@ class TestBline(unittest.TestCase):
def
test_import
(
self
):
"""
Test bline import
"""
with
patch
.
object
(
sys
,
'
argv
'
,
[
'
bline
'
]):
with
self
.
assertRaises
(
SystemExit
):
try
:
import
bline.bline
as
bp
self
.
assertTrue
(
bp
.
PROG_NAME
,
'
BLINE
'
)
except
ImportError
:
self
.
fail
(
'
Failed to import bline!
'
)
# with patch.object(sys, 'argv', ['bline']):
# with self.assertRaises(SystemExit):
# try:
# import bline.bline as bp
# self.assertTrue(bp.PROG_NAME, 'BLINE')
# except ImportError:
# self.fail('Failed to import bline!')
pass
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