Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajastro committed Jun 3, 2024
1 parent aa11390 commit 8aca9ac
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/operators/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,20 @@


@pytest.mark.skipif(
(sys.version_info.major, sys.version_info.minor) != (3, 12),
(sys.version_info.major, sys.version_info.minor) == (3, 12),
reason="The error message for the abstract class instantiation seems to have changed between Python 3.11 and 3.12",
)
def test_dbt_base_operator_is_abstract():
"""Tests that the abstract base operator cannot be instantiated since the base_cmd is not defined."""
expected_error = (
"Can't instantiate abstract class AbstractDbtBaseOperator with abstract methods base_cmd, build_and_run_cmd"
)
"""
Can't instantiate abstract class AbstractDbtBaseOperator without an implementation for abstract methods 'base_cmd', 'build_and_run_cmd'
"""
with pytest.raises(TypeError, match=expected_error):
AbstractDbtBaseOperator()


@pytest.mark.skipif(
(sys.version_info.major, sys.version_info.minor) == (3, 12),
(sys.version_info.major, sys.version_info.minor) != (3, 12),
reason="The error message for the abstract class instantiation seems to have changed between Python 3.11 and 3.12",
)
def test_dbt_base_operator_is_abstract_py12():
Expand Down

0 comments on commit 8aca9ac

Please sign in to comment.