Skip to content

A count of calls to ut.expect() procedure ? #1285

Open
@alan-rosenthal

Description

@alan-rosenthal

Is your feature request related to a problem? Please describe.
Not a problem

Describe the solution you'd like
At the end of a run it shows the number of tests performed, succeeded, and failed. That's fine. But it seems to be counting the number of test procedures that were executed. However, I frequently break the rule of one expectation per procedure. Some of mine have a couple calls to ut.expect() and some work off of lists and have hundreds of calls.

Is it possible to get the number of calls to ut.expect() in the final summary ?

Describe alternatives you've considered
I thought of adding a global counter to the ut.expect() calls like this:

ut.expect(x, 'values do not equal').to_equal(y); expect_count := expect_counter + 1;

and then print out the value of expect_counter .

Additional context

Note

Want to discuss

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy