Skip to content

Commit 500c647

Browse files
author
Xing Han Lu
committed
Pylint on tests
1 parent 372912b commit 500c647

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/IntegrationTests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ def tearDownClass(cls):
5353
def setUp(self):
5454
pass
5555

56-
def tearDown(self, port=8050):
56+
def tearDown(self):
5757
time.sleep(3)
5858
if platform.system() == 'Windows':
59-
requests.get('http://localhost:{}/stop'.format(port))
59+
requests.get('http://localhost:8050/stop')
6060
sys.exit()
6161
else:
6262
self.server_process.terminate()

tests/test_percy_snapshot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class Tests(IntegrationTests):
2222
the apps being tested in test_usage.py, display them in a simple
2323
Dash app, and use Percy to take a snapshot for CVI.
2424
"""
25+
2526
def test_usage(self):
2627
def encode(name):
2728
path = os.path.join(
@@ -53,7 +54,9 @@ def display_image(pathname):
5354
:param pathname: name of the screenshot, prefixed with "/"
5455
:return: An html.Img object containing the base64 encoded image
5556
"""
56-
if pathname:
57+
if not pathname or pathname == '/':
58+
return
59+
else:
5760
name = pathname.replace('/', '')
5861
return html.Img(id=name, src=encode(name))
5962

0 commit comments

Comments
 (0)