Skip to content

Commit

Permalink
Tests: fix python assertion
Browse files Browse the repository at this point in the history
    android_helper.py:43: SyntaxWarning: assertion is always true, perhaps remove parentheses?
    assert (cls.current_user != None, "Call _GetCurrentUser before using IsMultiUser")

This does "assert x"
where x=tuple (bool, str)
and is never falsey

Bug: b/361388557
Change-Id: I79a2d07ac59d611cf5e47f54f3ddb6a336322655
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5866133
Commit-Queue: Cody Northrop <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Roman Lavrov <[email protected]>
Auto-Submit: Roman Lavrov <[email protected]>
  • Loading branch information
romanl-g authored and Angle LUCI CQ committed Sep 16, 2024
1 parent 44a8184 commit 3cabe8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tests/py_utils/android_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class _Global(object):

@classmethod
def IsMultiUser(cls):
assert (cls.current_user != None, "Call _GetCurrentUser before using IsMultiUser")
assert cls.current_user != None, "Call _GetCurrentUser before using IsMultiUser"
return cls.current_user != '0'

def _ApkPath(suite_name):
Expand Down

0 comments on commit 3cabe8c

Please sign in to comment.