Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve assertion messages of aggregator stub #5975

Merged
merged 2 commits into from
Mar 5, 2020

Conversation

AlexandreYang
Copy link
Member

@AlexandreYang AlexandreYang commented Mar 5, 2020

What does this PR do?

Improve assertion messages

Motivation

Before

        if count is not None:
            assert len(candidates) == count
        else:
>           assert len(candidates) >= at_least
E           assert 0 >= 1
E            +  where 0 = len([])

After


E           AssertionError: Candidates size assertion for clickhouse.cache_dictionary.update_queue.batches, count: None, at_least: 1) failed
E           assert 0 >= 1
E            +  where 0 = len([])

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@ofek ofek changed the title Improve assertion messages Improve assertion messages of aggregator stub Mar 5, 2020
Copy link
Contributor

@prognant prognant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@AlexandreYang AlexandreYang merged commit 3e66b8d into master Mar 5, 2020
@AlexandreYang AlexandreYang deleted the alex/improve_assertion_messages branch March 5, 2020 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants