Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-6780

test_recover_paritions.py have always-true asserts

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • Impala 3.0, Impala 2.13.0
    • None
    • None
    • ghx-label-7

    Description

      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.

      /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,
      
      >>> assert (False, "hey")
      <stdin>:1: SyntaxWarning: assertion is always true, perhaps remove parentheses?
      

      Attachments

        Activity

          People

            alex.behm Alexander Behm
            philip Philip Martin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: