Skip to content

Commit

Permalink
TST: more py312 compatibility changes in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tacaswell committed May 13, 2024
1 parent 2975fca commit e9b36e1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jupyter_telemetry/tests/test_allowed_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,9 @@ def test_allowed_schemas(schema, allowed_schemas, expected_output):
allowed_schemas
)

# Cope with python3.12
if "taskName" in event_data:
del event_data["taskName"]

# Verify that *exactly* the right properties are recorded.
assert expected_output == event_data
20 changes: 20 additions & 0 deletions jupyter_telemetry/tests/test_category_filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ def test_category_filtering(allowed_schemas, expected_output):
allowed_schemas
)

# Cope with python3.12
if "taskName" in event_data:
del event_data["taskName"]

# Verify that *exactly* the right properties are recorded.
assert expected_output == event_data

Expand Down Expand Up @@ -291,6 +295,10 @@ def test_array_category_filtering(allowed_schemas, expected_output):
allowed_schemas
)

# Cope with python3.12
if "taskName" in event_data:
del event_data["taskName"]

# Verify that *exactly* the right properties are recorded.
assert expected_output == event_data

Expand Down Expand Up @@ -395,6 +403,10 @@ def test_no_additional_properties(allowed_schemas, expected_output):
allowed_schemas
)

# Cope with python3.12
if "taskName" in event_data:
del event_data["taskName"]

# Verify that *exactly* the right properties are recorded.
assert expected_output == event_data

Expand Down Expand Up @@ -488,6 +500,10 @@ def test_category_filtering_ref(allowed_schemas, expected_output):
allowed_schemas
)

# Cope with python3.12
if "taskName" in event_data:
del event_data["taskName"]

# Verify that *exactly* the right properties are recorded.
assert expected_output == event_data

Expand All @@ -504,5 +520,9 @@ def test_category_filtering_allof(allowed_schemas, expected_output):
allowed_schemas
)

# Cope with python3.12
if "taskName" in event_data:
del event_data["taskName"]

# Verify that *exactly* the right properties are recorded.
assert expected_output == event_data

0 comments on commit e9b36e1

Please sign in to comment.