Skip to content

Commit 0b2ecda

Browse files
committed
[chore] fix CI errors
1 parent 0824a30 commit 0b2ecda

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

launchable/commands/compare/subsets.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from http import HTTPStatus
22
from pathlib import Path
3-
from typing import Any, Generic, List, Optional, Sequence, Tuple, TypeVar, Union
3+
from typing import Any, Dict, Generic, List, Optional, Sequence, Tuple, TypeVar, Union
44

55
import click
66
from tabulate import tabulate
77

8-
from build.lib.launchable.testpath import unparse_test_path
8+
from launchable.testpath import unparse_test_path
99
from launchable.utils.launchable_client import LaunchableClient
1010

1111
try:
@@ -29,7 +29,7 @@ class SubsetResult(SubsetResultBase):
2929
duration_sec: float
3030

3131
@classmethod
32-
def from_inspect_api(cls, result: dict[str, Any], order: int) -> "SubsetResult":
32+
def from_inspect_api(cls, result: Dict[str, Any], order: int) -> "SubsetResult":
3333
test_path = result.get("testPath", []) or []
3434
name = unparse_test_path(test_path)
3535
density = float(result.get("density") or 0.0)
@@ -125,7 +125,7 @@ def subsets(context: click.core.Context, file_before, file_after, subset_id_befo
125125

126126
if from_subset_id:
127127

128-
client = LaunchableClient(app=context)
128+
client = LaunchableClient(app=context.obj)
129129
# for type check
130130
assert subset_id_before is not None and subset_id_after is not None
131131
_from_subset_ids(client=client, subset_id_before=subset_id_before, subset_id_after=subset_id_after)
@@ -152,7 +152,7 @@ def _from_subset_ids(client: LaunchableClient, subset_id_before: int, subset_id_
152152
for result in after_subset.results:
153153
total += 1
154154
if result.reason.startswith("Changed file: "):
155-
affected.add(result.reason.removeprefix("Changed file: "))
155+
affected.add(result.reason[len("Changed file: "):])
156156

157157
test_name = result.name
158158
after_order = result.order

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ packages = find:
1717
install_requires =
1818
click>=8.0,<8.1;python_version=='3.6'
1919
click>=8.1,<8.2;python_version>'3.6'
20-
dataclass
20+
dataclass;python_version=='3.6'
2121
requests>=2.25;python_version>='3.6'
2222
urllib3>=1.26
2323
junitparser>=4.0.0

tests/commands/compare/test_subsets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import responses
55

6-
from smart_tests.utils.http_client import get_base_url
6+
from build.lib.launchable.utils.http_client import get_base_url
77
from tests.cli_test_case import CliTestCase
88

99

@@ -157,7 +157,7 @@ def tearDown(self):
157157
if os.path.exists("subset-after.txt"):
158158
os.remove("subset-after.txt")
159159

160-
@mock.patch.dict(os.environ, {"SMART_TESTS_TOKEN": CliTestCase.smart_tests_token})
160+
@mock.patch.dict(os.environ, {"LAUNCHABLE_TOKEN": CliTestCase.launchable_token})
161161
@responses.activate
162162
def test_subsets_subset_ids(self):
163163
responses.add(

0 commit comments

Comments
 (0)