Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Fail on unhandled warnings #2197

Merged
merged 5 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,26 @@ pytest-codspeed = ">=2.2.0"

[tool.pytest.ini_options]
addopts = '--ignore=singer_sdk/helpers/_simpleeval.py -m "not external"'
filterwarnings = [
"error",
"ignore:Could not configure external gitlab tests:UserWarning",
"ignore:No records were available to test:UserWarning",
# https://github.com/meltano/sdk/issues/1354
"ignore:The function singer_sdk.testing.get_standard_tap_tests is deprecated:DeprecationWarning",
# https://docs.python.org/3.12/whatsnew/3.12.html#deprecated
# https://github.com/danthedeckie/simpleeval/blob/master/simpleeval.py
"ignore:ast.NameConstant is deprecated:DeprecationWarning:simpleeval",
# https://docs.python.org/3.12/whatsnew/3.12.html#deprecated
# https://github.com/danthedeckie/simpleeval/blob/master/simpleeval.py
"ignore:ast.Num is deprecated:DeprecationWarning:simpleeval",
# https://github.com/joblib/joblib/pull/1518
"ignore:ast.Num is deprecated:DeprecationWarning:joblib._utils",
# https://docs.python.org/3.12/whatsnew/3.12.html#deprecated
# https://github.com/danthedeckie/simpleeval/blob/master/simpleeval.py
"ignore:ast.Str is deprecated:DeprecationWarning:simpleeval",
# https://github.com/joblib/joblib/pull/1518
"ignore:Attribute n is deprecated:DeprecationWarning:joblib._utils",
]
markers = [
"external: Tests relying on external resources",
"windows: Tests that only run on Windows",
Expand Down
13 changes: 12 additions & 1 deletion samples/sample_tap_gitlab/gitlab_rest_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
DateTimeType,
DateType,
IntegerType,
ObjectType,
PropertiesList,
Property,
StringType,
Expand Down Expand Up @@ -158,7 +159,6 @@ class EpicsStream(ProjectBasedStream):
Property("title", StringType),
Property("description", StringType),
Property("state", StringType),
Property("author_id", IntegerType),
Property("start_date", DateType),
Property("end_date", DateType),
Property("due_date", DateType),
Expand All @@ -167,6 +167,17 @@ class EpicsStream(ProjectBasedStream):
Property("labels", ArrayType(StringType)),
Property("upvotes", IntegerType),
Property("downvotes", IntegerType),
Property(
"author",
ObjectType(
Property("id", IntegerType),
Property("name", StringType),
Property("username", StringType),
Property("state", StringType),
Property("avatar_url", StringType),
Property("web_url", StringType),
),
),
).to_dict()

def get_child_context(
Expand Down
Loading
Loading