Skip to content

[BUG] row count only tests can fail with 'int' object is not iterable #11305

Description

@jlowe

Tests that perform comparisons only on row counts can result in a failure like the following:

cpu = 35076286, gpu = 1296000

    def assert_equal(cpu, gpu):
        """Verify that the result from the CPU and the GPU are equal"""
        try:
            _assert_equal(cpu, gpu, float_check=get_float_check(), path=[])
        except:
            sys.stdout.writelines(difflib.unified_diff(
>               a=[f"{x}\n" for x in cpu],
                b=[f"{x}\n" for x in gpu],
                fromfile='CPU OUTPUT',
                tofile='GPU OUTPUT'))
E           TypeError: 'int' object is not iterable

../../src/main/python/asserts.py:114: TypeError

The framework is trying to generate a row diff as part of the test failure output, but there isn't a list of rows when the test is collecting row counts instead of rows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomerstestOnly impacts tests

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions