Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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
Changes from1 commit
Commits
Show all changes
11 commits
Select commitHold shift + click to select a range
aecdcfb
[conftest] Advanced processing of logging
dmitry-lipetskMar 31, 2025
9bc0ba2
Merge branch 'master' into D20250331_003--logging
dmitry-lipetskApr 1, 2025
88bb6ae
[conftest] XFail does not respect SIGNAL_EXCEPTION
dmitry-lipetskApr 1, 2025
24b20c8
[summary] An error count of each test is printed
dmitry-lipetskApr 1, 2025
4c595cc
conftest is updated [debug checks]
dmitry-lipetskApr 1, 2025
4e100ca
conftest is updated [formatting]
dmitry-lipetskApr 1, 2025
202e526
False XFail message has 'info' status [not warning]
dmitry-lipetskApr 1, 2025
b8e383d
[summary] List of tests with warnings is printed.
dmitry-lipetskApr 1, 2025
f56fc94
TEST_PROCESS_STATS::incrementFailedTestCount is updated [debug check]
dmitry-lipetskApr 1, 2025
98d032f
[summary] total errors/warnings/duration are printed
dmitry-lipetskApr 1, 2025
282213f
test_conftest.py--devel is added
dmitry-lipetskApr 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
@dmitry-lipetsk
dmitry-lipetsk committedApr 1, 2025
commit282213f945a720a2f47660c0c3cbe173f370638b
80 changes: 80 additions & 0 deletionstests/test_conftest.py--devel
View file
Open in desktop
Original file line numberDiff line numberDiff 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!")

[8]ページ先頭

©2009-2025 Movatter.jp