Skip to content

Commit

Permalink
add name to allure plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ShurikMen committed Sep 5, 2022
1 parent b186b93 commit c694e74
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion allure-pytest/src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def pytest_configure(config):
if report_dir:
report_dir = os.path.abspath(report_dir)
test_listener = AllureListener(config)
config.pluginmanager.register(test_listener)
config.pluginmanager.register(test_listener, 'allure_listener')
allure_commons.plugin_manager.register(test_listener)
config.add_cleanup(cleanup_factory(test_listener))

Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import allure
from hamcrest import assert_that
from allure_commons_test.report import has_test_case
from allure_commons_test.result import with_status


@allure.feature("Integration")
def test_pytest_get_allure_listener_plugin(allured_testdir):
allured_testdir.testdir.makepyfile("""
def test_pytest_get_allure_listener_plugin(request):
assert request.config.pluginmanager.get_plugin('allure_listener')
""")

allured_testdir.run_with_allure()

assert_that(allured_testdir.allure_report,
has_test_case("test_pytest_get_allure_listener_plugin",
with_status("passed"))
)

0 comments on commit c694e74

Please sign in to comment.