Comments (13)
Those look like two totally different results to me, and it's not clear if they should both be colored the same or not. Can you provide the test that resulted in this? Or reproduce with a different test? I can provide you with sample tests that give all the different outcomes if you like.
from pytest-check.
@jeffwright13 Yes, sure. It's easily reproducing. Below comparing outputs from classic assert, pytest-assume and pytest-check and all results exported to pytest-html with next args:
--html=report.html --self-contained-html
from pytest_assume.plugin import assume
from pytest_check import check
def test_assert():
assert 2 < 1, 'some message'
def test_assume():
with assume: assert 2 < 1, 'some message'
def test_check():
with check: assert 2 < 1, 'some message'
in html we see that classic assert and pytest-assume have classic red color in AssertionError message, except of pytest-check
from pytest-check.
Oh, I see what you are saying now. I didn't pick up on the fact that you're using different plugins, each of which changes the output in some way.
I'm sure @okken is more than capable of figuring out the issue, so I will just watch from the sidelines. I'd take a stab at it myself, but it does take time to assimilate someone else's code, and I'm not super familiar with this plugin.
from pytest-check.
I'm open to consider PRs for the change.
from pytest-check.
This is a good idea.
working on a solution.
from pytest-check.
color added in #94
from pytest-check.
I haven't checked the html output
from pytest-check.
My changes don't help any with the html output from pytest-html.
from pytest-check.
I actually think I made things worse for pytest-html.
So if using pytest-html, I recommend --color=no until we get this sorted out.
from pytest-check.
This makes me curious about how my plugin will handle this situation. I'll give it a test.
from pytest-check.
probably pushing to main today
from pytest-check.
This would require digging into pytest-html, maybe, which I'm not interested in doing at this time.
from pytest-check.
Closing for now. Feel free to bring up the issue again if you've got any thoughts on how to implement it.
from pytest-check.
Related Issues (20)
- Count passed checks made with `pytest-check` HOT 5
- Feature request: own error message for showing in a short test summary info HOT 1
- Test is not marked as xfailed HOT 1
- Unclear intended minimum Python version
- Unchecked _max_tb causing TypeError: '<=' not supported between instances of 'int' and 'nonetype' HOT 7
- Feature request: Add new test outcome status ? HOT 1
- Test is not marked as xfailed when pytest.xfail() called after a failure. HOT 2
- RFE: is it possible to start making github releases?🤔 HOT 6
- pytest check is not reporting all failures distributed across multiple python functions or setup fixture called within a test function HOT 3
- Linux environment does not have version 2.1.5 HOT 3
- Document & test: custom error message for check.raises HOT 2
- raises match argument HOT 1
- Is the 'raises' parameter in xfail ignored? HOT 1
- `pytest-check` causes `pytest-xdist` testing to fail HOT 1
- Add new check type: match - use regular expressions to tests againgst a string HOT 1
- pytest_html HOT 1
- How to have all failure on logging pytestfile HOT 1
- [v2.2.3] ExceptionRepr creation is not compatible with pytest < 7.3. HOT 2
- INTERNALERROR after upgrading package to 2.2.3 or 2.2.4 version HOT 5
- Add an xdist test
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-check.