Skip to content

Commit

Permalink
Merge pull request #347 from getappmap/numpy2_20240702
Browse files Browse the repository at this point in the history
Fix tests that fail with numpy v2
  • Loading branch information
apotterri authored Jul 3, 2024
2 parents 660e31f + 231af72 commit 4bc86ba
Show file tree
Hide file tree
Showing 9 changed files with 388 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,75 +8,95 @@
"name": "appmap",
"url": "https://github.com/applandinc/appmap-python"
},
"source_location": "test_simple.py:5",
"name": "hello world",
"feature": "Hello world",
"app": "Simple",
"recorder": {
"name": "pytest",
"type": "tests"
},
"source_location": "test_simple.py:5",
"name": "hello world",
"feature": "Hello world",
"test_status": "succeeded"
},
"events": [
{
"defined_class": "simple.Simple",
"method_id": "hello_world",
"path": "simple.py",
"lineno": 8,
"static": false,
"receiver": {
"class": "simple.Simple",
"kind": "req",
"value": "<simple.Simple object at 0xabcdef>",
"name": "self",
"class": "simple.Simple"
"value": "<simple.Simple object at 0xabcdef>"
},
"parameters": [],
"id": 1,
"event": "call",
"thread_id": 1,
"defined_class": "simple.Simple",
"method_id": "hello_world",
"path": "simple.py",
"lineno": 16
"thread_id": 1
},
{
"defined_class": "simple.Simple",
"method_id": "hello",
"path": "simple.py",
"lineno": 2,
"static": false,
"receiver": {
"class": "simple.Simple",
"kind": "req",
"value": "<simple.Simple object at 0xabcdef>",
"name": "self",
"class": "simple.Simple"
"value": "<simple.Simple object at 0xabcdef>"
},
"parameters": [],
"id": 2,
"event": "call",
"thread_id": 1,
"defined_class": "simple.Simple",
"method_id": "get_non_json_serializable",
"path": "simple.py",
"lineno": 13
"thread_id": 1
},
{
"return_value": {
"class": "builtins.str",
"value": "'Hello'"
},
"parent_id": 2,
"id": 3,
"event": "return",
"thread_id": 1
},
{
"defined_class": "simple.Simple",
"method_id": "world",
"path": "simple.py",
"lineno": 5,
"static": false,
"receiver": {
"class": "simple.Simple",
"kind": "req",
"value": "<simple.Simple object at 0xabcdef>",
"name": "self",
"class": "simple.Simple"
"value": "<simple.Simple object at 0xabcdef>"
},
"parameters": [],
"id": 3,
"id": 4,
"event": "call",
"thread_id": 1,
"defined_class": "simple.Simple",
"method_id": "hello",
"path": "simple.py",
"lineno": 7
"thread_id": 1
},
{
"return_value": {
"value": "'Hello'",
"class": "builtins.str"
"class": "builtins.str",
"value": "'world!'"
},
"parent_id": 3,
"id": 4,
"parent_id": 4,
"id": 5,
"event": "return",
"thread_id": 1
},
{
"return_value": {
"class": "builtins.str",
"value": "'Hello world!'"
},
"parent_id": 1,
"id": 6,
"event": "return",
"thread_id": 1
},
Expand All @@ -89,27 +109,52 @@
"class": "simple.Simple"
},
"parameters": [],
"id": 5,
"id": 7,
"event": "call",
"thread_id": 1,
"defined_class": "simple.Simple",
"method_id": "world",
"method_id": "show_numpy_dict",
"path": "simple.py",
"lineno": 10
"lineno": 11
},
{
"return_value": {
"value": "'world!'",
"class": "builtins.str"
"static": false,
"receiver": {
"kind": "req",
"value": "<simple.Simple object at 0xabcdef>",
"name": "self",
"class": "simple.Simple"
},
"parent_id": 5,
"id": 6,
"event": "return",
"thread_id": 1
"parameters": [
{
"kind": "req",
"value": "{0: 'zero', 1: 'one'}",
"name": "d",
"class": "builtins.dict",
"properties": [
{
"name": "0",
"class": "builtins.str"
},
{
"name": "1",
"class": "builtins.str"
}
],
"size": 2
}
],
"id": 8,
"event": "call",
"thread_id": 1,
"defined_class": "simple.Simple",
"method_id": "get_numpy_dict",
"path": "simple.py",
"lineno": 18
},
{
"return_value": {
"value": "{0: 'Hello', 1: 'world!'}",
"value": "{0: 'zero', 1: 'one'}",
"class": "builtins.dict",
"properties": [
{
Expand All @@ -123,18 +168,29 @@
],
"size": 2
},
"parent_id": 2,
"id": 7,
"parent_id": 8,
"id": 9,
"event": "return",
"thread_id": 1
},
{
"return_value": {
"value": "'Hello world!'",
"class": "builtins.str"
"value": "{0: 'zero', 1: 'one'}",
"class": "builtins.dict",
"properties": [
{
"name": "0",
"class": "builtins.str"
},
{
"name": "1",
"class": "builtins.str"
}
],
"size": 2
},
"parent_id": 1,
"id": 8,
"parent_id": 7,
"id": 10,
"event": "return",
"thread_id": 1
}
Expand All @@ -149,27 +205,33 @@
"type": "class",
"children": [
{
"name": "get_non_json_serializable",
"name": "get_numpy_dict",
"type": "function",
"location": "simple.py:13",
"location": "simple.py:18",
"static": false
},
{
"name": "hello",
"type": "function",
"location": "simple.py:7",
"location": "simple.py:2",
"static": false
},
{
"name": "hello_world",
"type": "function",
"location": "simple.py:16",
"location": "simple.py:8",
"static": false
},
{
"name": "show_numpy_dict",
"type": "function",
"location": "simple.py:11",
"static": false
},
{
"name": "world",
"type": "function",
"location": "simple.py:10",
"location": "simple.py:5",
"static": false
}
]
Expand Down
Loading

0 comments on commit 4bc86ba

Please sign in to comment.