Skip to content

Commit f22f28a

Browse files
ctruedenclaude
andcommitted
Align test sources more nicely with implementation
Co-authored-by: Claude <noreply@anthropic.com>
1 parent a844307 commit f22f28a

11 files changed

Lines changed: 19 additions & 13 deletions

File tree

β€Žbin/api.shβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
uv run stubgen --include-private -p appose -o api/
3-
uv run stubgen --include-private -o api tests/*.py
3+
uv run stubgen --include-private -o api tests/*.py tests/*/*.py
44

55
# Transform .pyi inputs to .api outputs.
66
# The .api files are merely lightly postprocessed stub files to

β€Žtests/builder/__init__.pyβ€Ž

Whitespace-only changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
from appose.builder import DynamicBuilder
3636
from appose.builder.mamba import MambaBuilder
3737

38-
from .test_builder_base import cowsay_and_assert
38+
from tests.test_base import cowsay_and_assert
3939

4040

4141
# Get the path to test resources
42-
TEST_RESOURCES = Path(__file__).parent / "resources" / "envs"
42+
TEST_RESOURCES = Path(__file__).parent.parent / "resources" / "envs"
4343

4444

4545
def test_explicit_mamba_builder():
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
from appose.builder import DynamicBuilder
3838
from appose.builder.pixi import PixiBuilder
3939

40-
from .test_builder_base import cowsay_and_assert
40+
from tests.test_base import cowsay_and_assert
4141

4242

4343
# Get the path to test resources
44-
TEST_RESOURCES = Path(__file__).parent / "resources" / "envs"
44+
TEST_RESOURCES = Path(__file__).parent.parent / "resources" / "envs"
4545

4646

4747
def test_conda():
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
from appose.builder import SimpleBuilder
3838

39-
from .test_builder_base import assert_complete, maybe_debug
39+
from tests.test_base import assert_complete, maybe_debug
4040

4141

4242
def test_custom():
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434

3535
from appose.builder.uv import UvBuilder
3636

37-
from .test_builder_base import cowsay_and_assert
37+
from tests.test_base import cowsay_and_assert
3838

3939

4040
# Get the path to test resources
41-
TEST_RESOURCES = Path(__file__).parent / "resources" / "envs"
41+
TEST_RESOURCES = Path(__file__).parent.parent / "resources" / "envs"
4242

4343

4444
def test_uv():
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
from appose.builder.mamba import MambaBuilder
3838
from appose.builder.pixi import PixiBuilder
3939

40-
from .test_builder_base import cowsay_and_assert
40+
from tests.test_base import cowsay_and_assert
4141

4242

4343
# Get the path to test resources
44-
TEST_RESOURCES = Path(__file__).parent / "resources" / "envs"
44+
TEST_RESOURCES = Path(__file__).parent.parent / "resources" / "envs"
4545

4646

4747
def test_wrap_pixi():
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,20 @@ def __init__(self, event):
105105
assert update.status == TaskStatus.RUNNING
106106
assert update.message == f"[{i}] -> {v}"
107107
assert update.current == i
108-
assert update.maximum == 0
108+
assert (
109+
update.maximum is None or update.maximum == 0
110+
) # Python uses None, Java uses 0
109111
assert update.error is None
110112

111113
completion = events[92]
112114
assert completion.response_type == ResponseType.COMPLETION
113115
assert completion.message is None # no message from non-UPDATE response
114-
assert completion.current == 0 # no current from non-UPDATE response
115-
assert completion.maximum == 0 # no maximum from non-UPDATE response
116+
assert (
117+
completion.current is None or completion.current == 0
118+
) # Python uses None, Java uses 0
119+
assert (
120+
completion.maximum is None or completion.maximum == 0
121+
) # Python uses None, Java uses 0
116122
assert completion.error is None
117123

118124

β€Žtests/util/__init__.pyβ€Ž

Whitespace-only changes.

0 commit comments

Comments
Β (0)