Skip to content

Commit 1c20390

Browse files
committed
cleanup
1 parent a1383db commit 1c20390

File tree

3 files changed

+1
-21
lines changed

3 files changed

+1
-21
lines changed

python_files/tests/pytestadapter/helpers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def process_data_received(data: str) -> List[Dict[str, Any]]:
7171
7272
This function also:
7373
- Checks that the jsonrpc value is 2.0
74-
- Checks that the last JSON message contains the `eot` token.
7574
"""
7675
json_messages = []
7776
remaining = data
@@ -85,15 +84,14 @@ def process_data_received(data: str) -> List[Dict[str, Any]]:
8584
else:
8685
json_messages.append(json_data["params"])
8786

88-
return json_messages # return the list of json messages, only the params part without the EOT token
87+
return json_messages # return the list of json messages
8988

9089

9190
def parse_rpc_message(data: str) -> Tuple[Dict[str, str], str]:
9291
"""Process the JSON data which comes from the server.
9392
9493
A single rpc payload is in the format:
9594
content-length: #LEN# \r\ncontent-type: application/json\r\n\r\n{"jsonrpc": "2.0", "params": ENTIRE_DATA}
96-
with EOT params: "params": {"command_type": "discovery", "eot": true}
9795
9896
returns:
9997
json_data: A single rpc payload of JSON data from the server.

python_files/unittestadapter/pvsc_utils.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,6 @@ class ExecutionPayloadDict(TypedDict):
7474
error: NotRequired[str]
7575

7676

77-
class EOTPayloadDict(TypedDict):
78-
"""A dictionary that is used to send a end of transmission post request to the server."""
79-
80-
command_type: Literal["discovery", "execution"]
81-
eot: bool
82-
83-
8477
class FileCoverageInfo(TypedDict):
8578
lines_covered: List[int]
8679
lines_missed: List[int]

python_files/vscode_pytest/__init__.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -455,10 +455,6 @@ def pytest_sessionfinish(session, exitstatus):
455455
)
456456
send_post_request(payload)
457457

458-
command_type = "discovery" if IS_DISCOVERY else "execution"
459-
payload_eot: EOTPayloadDict = {"command_type": command_type, "eot": True}
460-
send_post_request(payload_eot)
461-
462458

463459
def build_test_tree(session: pytest.Session) -> TestNode:
464460
"""Builds a tree made up of testing nodes from the pytest session.
@@ -782,13 +778,6 @@ class CoveragePayloadDict(Dict):
782778
error: str | None # Currently unused need to check
783779

784780

785-
class EOTPayloadDict(TypedDict):
786-
"""A dictionary that is used to send a end of transmission post request to the server."""
787-
788-
command_type: Literal["discovery", "execution"]
789-
eot: bool
790-
791-
792781
def get_node_path(node: Any) -> pathlib.Path:
793782
"""A function that returns the path of a node given the switch to pathlib.Path.
794783

0 commit comments

Comments
 (0)