You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Philip Zeyliger (JIRA)" <ji...@apache.org> on 2018/03/30 21:53:00 UTC

[jira] [Created] (IMPALA-6780) test_recover_paritions.py have always-true asserts

Philip Zeyliger created IMPALA-6780:
---------------------------------------

             Summary: test_recover_paritions.py have always-true asserts
                 Key: IMPALA-6780
                 URL: https://issues.apache.org/jira/browse/IMPALA-6780
             Project: IMPALA
          Issue Type: Task
            Reporter: Philip Zeyliger
            Assignee: Alexander Behm


I discovered in the process of looking at IMPALA-6453 that we have some assertions that the Python 2.6 compiler thinks are always true. This seems like a true test bug.

{code}
/tmp/zz/mnt/tests/metadata/test_recover_partitions.py:91: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert (self.has_value(PART_NAME, result.data),
/tmp/zz/mnt/tests/metadata/test_recover_partitions.py:95: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert (self.has_value(INSERTED_VALUE, result.data),
/tmp/zz/mnt/tests/metadata/test_recover_partitions.py:108: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert (len(result.data) == old_length,
/tmp/zz/mnt/tests/metadata/test_recover_partitions.py:124: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert (self.has_value("NULL", result.data),
/tmp/zz/mnt/tests/metadata/test_recover_partitions.py:255: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert ((old_length + 1) == len(result.data),
/tmp/zz/mnt/tests/metadata/test_recover_partitions.py:288: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert (self.has_value(INSERTED_VALUE, result.data),
/tmp/zz/mnt/tests/metadata/test_recover_partitions.py:332: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert (len(result.data) == (old_length + 1),
/tmp/zz/mnt/tests/metadata/test_recover_partitions.py:362: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert (self.count_partition(result.data) == 1,
/tmp/zz/mnt/tests/metadata/test_recover_partitions.py:365: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert (self.count_value('p=100%25', result.data) == 1,
/tmp/zz/mnt/tests/metadata/test_recover_partitions.py:389: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert (len(result.data) == old_length,
{code}

{code}
>>> assert (False, "hey")
<stdin>:1: SyntaxWarning: assertion is always true, perhaps remove parentheses?
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)