- Notifications
You must be signed in to change notification settings - Fork35
[conftest] Advanced processing of logging#230
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
dmitry-lipetsk merged 11 commits intopostgrespro:masterfromdmitry-lipetsk:D20250331_003--loggingApr 1, 2025
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
11 commits Select commitHold shift + click to select a range
aecdcfb
[conftest] Advanced processing of logging
dmitry-lipetsk9bc0ba2
Merge branch 'master' into D20250331_003--logging
dmitry-lipetsk88bb6ae
[conftest] XFail does not respect SIGNAL_EXCEPTION
dmitry-lipetsk24b20c8
[summary] An error count of each test is printed
dmitry-lipetsk4c595cc
conftest is updated [debug checks]
dmitry-lipetsk4e100ca
conftest is updated [formatting]
dmitry-lipetsk202e526
False XFail message has 'info' status [not warning]
dmitry-lipetskb8e383d
[summary] List of tests with warnings is printed.
dmitry-lipetskf56fc94
TEST_PROCESS_STATS::incrementFailedTestCount is updated [debug check]
dmitry-lipetsk98d032f
[summary] total errors/warnings/duration are printed
dmitry-lipetsk282213f
test_conftest.py--devel is added
dmitry-lipetskFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
PrevPrevious commit
test_conftest.py--devel is added
It is an internal code for testing a conftest.py.
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit282213f945a720a2f47660c0c3cbe173f370638b
There are no files selected for viewing
80 changes: 80 additions & 0 deletionstests/test_conftest.py--devel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import pytest | ||
import logging | ||
class TestConfest: | ||
def test_failed(self): | ||
raise Exception("TEST EXCEPTION!") | ||
def test_ok(self): | ||
pass | ||
@pytest.mark.skip() | ||
def test_mark_skip__no_reason(self): | ||
pass | ||
@pytest.mark.xfail() | ||
def test_mark_xfail__no_reason(self): | ||
raise Exception("XFAIL EXCEPTION") | ||
@pytest.mark.xfail() | ||
def test_mark_xfail__no_reason___no_error(self): | ||
pass | ||
@pytest.mark.skip(reason="reason") | ||
def test_mark_skip__with_reason(self): | ||
pass | ||
@pytest.mark.xfail(reason="reason") | ||
def test_mark_xfail__with_reason(self): | ||
raise Exception("XFAIL EXCEPTION") | ||
@pytest.mark.xfail(reason="reason") | ||
def test_mark_xfail__with_reason___no_error(self): | ||
pass | ||
def test_exc_skip__no_reason(self): | ||
pytest.skip() | ||
def test_exc_xfail__no_reason(self): | ||
pytest.xfail() | ||
def test_exc_skip__with_reason(self): | ||
pytest.skip(reason="SKIP REASON") | ||
def test_exc_xfail__with_reason(self): | ||
pytest.xfail(reason="XFAIL EXCEPTION") | ||
def test_log_error(self): | ||
logging.error("IT IS A LOG ERROR!") | ||
def test_log_error_and_exc(self): | ||
logging.error("IT IS A LOG ERROR!") | ||
raise Exception("TEST EXCEPTION!") | ||
def test_log_error_and_warning(self): | ||
logging.error("IT IS A LOG ERROR!") | ||
logging.warning("IT IS A LOG WARNING!") | ||
logging.error("IT IS THE SECOND LOG ERROR!") | ||
logging.warning("IT IS THE SECOND LOG WARNING!") | ||
@pytest.mark.xfail() | ||
def test_log_error_and_xfail_mark_without_reason(self): | ||
logging.error("IT IS A LOG ERROR!") | ||
@pytest.mark.xfail(reason="It is a reason message") | ||
def test_log_error_and_xfail_mark_with_reason(self): | ||
logging.error("IT IS A LOG ERROR!") | ||
@pytest.mark.xfail() | ||
def test_two_log_error_and_xfail_mark_without_reason(self): | ||
logging.error("IT IS THE FIRST LOG ERROR!") | ||
logging.info("----------") | ||
logging.error("IT IS THE SECOND LOG ERROR!") | ||
@pytest.mark.xfail(reason="It is a reason message") | ||
def test_two_log_error_and_xfail_mark_with_reason(self): | ||
logging.error("IT IS THE FIRST LOG ERROR!") | ||
logging.info("----------") | ||
logging.error("IT IS THE SECOND LOG ERROR!") |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.