Skip to content

Commit

Permalink
use isinstance for type comparison
Browse files Browse the repository at this point in the history
fixes a flake8 failure
  • Loading branch information
ikirudennis committed Aug 5, 2024
1 parent 66312bd commit 964b71c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_console_script():
command, stdout=subprocess.PIPE).communicate()[0]
with open('tests/fixtures/README.txt') as f:
expect = ''.join(f.readlines())
if type(result) == bytes:
if isinstance(result, bytes):
result = result.decode('utf-8')
assert result == expect

Expand All @@ -27,6 +27,6 @@ def test_version_string():
command[2] = 'textile.__main__'
result = subprocess.Popen(
command, stdout=subprocess.PIPE).communicate()[0]
if type(result) == bytes:
if isinstance(result, bytes):
result = result.decode('utf-8')
assert result.strip() == textile.__version__

0 comments on commit 964b71c

Please sign in to comment.