jeffwright13 / pytest-fold

A Pytest plugin to make console output more manageable when there are multiple failed tests
MIT License
12 stars 2 forks source link

Testing #5

Closed jeffwright13 closed 2 years ago

jeffwright13 commented 3 years ago
  1. Error/warning tests:
    • failed (f)
    • error (E)
    • skipped (s)
    • xfailed (x)
    • xpassed (X)
    • passed (p)
  2. --v / -q / --tb / --no-header / --showlocals
  3. Eventually, test the plugin as per Pytest docs https://docs.pytest.org/en/6.2.x/writing_plugins.html#testing-plugins
jeffwright13 commented 3 years ago

Seems to work so far with casual testing for -q, --no-header, --showlocals, -v. Works OK in casual testing for --tb except for --tb=native. See Issue 6. Works in conjunction with ERROR situations - at least those that occur at setup, e.g. calling a fixture that does not exist.

Still need to test with non-Pass/Fail marks: pXxs.

bbelderbos commented 3 years ago

Great progress, do you need help with anything (today)?

jeffwright13 commented 3 years ago

Nah, going to focus on the move to Colorado for the next 22 weeks; in the background look at how we might actually implement the folding in-console, as time permits.

I still think it might be do-able without the use of an external editor. If you look at other plugins like pytest-sugar, they are intercepting ASCII character writes in the TerminalReporter class (or something like that), and backing up/erasing characters with ASCII control characters, overwriting them, then sending on to the console. Or at least, that is how a quick glance at the code makes it seem to me.

bbelderbos commented 3 years ago

22 weeks? lol I agree those plugins are proof that it's possible, but the code is not easy :)

For the sake of PDM goals this was the only project we had pending right? Meaning the other ones you got all done to the extend that you wanted, no?

jeffwright13 commented 3 years ago

Correct!