Skip to content

Commit c9103b9

Browse files
committed
[Tests] Made tests for None explicit
pytest warning
1 parent 7f1ec84 commit c9103b9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/test_kicost.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ def xlsx_to_txt(filename, subdir='result_test', sheet=1):
115115
for d in ET.parse(styles).getroot().find(ns+'dxfs').iter(ns+'dxf'):
116116
fg = '-'
117117
font = d.find(ns+'font')
118-
if font:
118+
if font is not None:
119119
fg = font.find(ns+'color').attrib['rgb']
120120
bg = '-'
121121
fill = d.find(ns+'fill')
122-
if fill:
122+
if fill is not None:
123123
fill = fill.find(ns+'patternFill')
124-
if fill:
124+
if fill is not None:
125125
bg = fill.find(ns+'bgColor').attrib['rgb']
126126
dxfs.append(fg+'/'+bg)
127127
# Now the conditions
@@ -143,7 +143,7 @@ def xlsx_to_txt(filename, subdir='result_test', sheet=1):
143143
urls = {}
144144
nr = '{http://schemas.openxmlformats.org/officeDocument/2006/relationships}'
145145
hlinks = root.find(ns+'hyperlinks')
146-
if hlinks:
146+
if hlinks is not None:
147147
for r in hlinks.iter(ns+'hyperlink'):
148148
links[r.attrib['ref']] = r.attrib[nr+'id']
149149
# Read the strings

0 commit comments

Comments
 (0)