File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
tests/testing/internal/pytest Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 22
33import json
44import os
5+ from unittest .mock import Mock
56from unittest .mock import patch
67
78from _pytest .pytester import Pytester
89import pytest
910
1011from ddtrace .constants import ERROR_MSG
1112from ddtrace .ext import test
13+ from ddtrace .testing .internal .pytest .bdd import BddTestOptPlugin
1214from ddtrace .testing .internal .pytest .bdd import _get_step_func_args_json
15+ from tests .contrib .patch import emit_integration_and_version_to_test_agent
1316from tests .testing .mocks import EventCapture
1417from tests .testing .mocks import mock_api_client_settings
1518from tests .testing .mocks import setup_standard_mocks
2528
2629
2730class TestPytestBdd :
28- # def test_and_emit_get_version(self, pytester: Pytester) -> None:
29- # version = get_version()
30- # assert isinstance(version, str)
31- # assert version != ""
32- # emit_integration_and_version_to_test_agent("pytest-bdd", version)
31+ def test_and_emit_get_version (self ) -> None :
32+ plugin = BddTestOptPlugin (Mock ())
33+ version = plugin ._get_framework_version ()
34+ assert isinstance (version , str )
35+ assert version != ""
36+ emit_integration_and_version_to_test_agent ("pytest-bdd" , version )
3337
3438 def test_pytest_bdd_scenario_with_parameters (self , pytester : Pytester ) -> None :
3539 """Test that pytest-bdd traces scenario with all steps."""
You can’t perform that action at this time.
0 commit comments