scalebox-sdk 0.1.11__py3-none-any.whl → 0.1.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- scalebox/__init__.py +1 -1
- scalebox/code_interpreter/code_interpreter_async.py +12 -12
- scalebox/code_interpreter/code_interpreter_sync.py +11 -11
- scalebox/generated/api_pb2_connect.py +3 -3
- scalebox/sandbox_sync/main.py +1 -1
- scalebox/test/aclient.py +72 -72
- scalebox/test/code_interpreter_centext.py +21 -21
- scalebox/test/code_interpreter_centext_sync.py +21 -21
- scalebox/test/code_interpreter_test.py +34 -34
- scalebox/test/code_interpreter_test_sync.py +34 -34
- scalebox/test/run_all_validation_tests.py +334 -334
- scalebox/test/test_basic.py +78 -78
- scalebox/test/test_code_interpreter_async_comprehensive.py +2653 -2653
- scalebox/test/test_code_interpreter_e2basync_comprehensive.py +2655 -2655
- scalebox/test/test_code_interpreter_e2bsync_comprehensive.py +3416 -3416
- scalebox/test/test_code_interpreter_execcode.py +3352 -0
- scalebox/test/test_code_interpreter_sync_comprehensive.py +3416 -3412
- scalebox/test/test_csx_desktop_examples.py +130 -0
- scalebox/test/test_e2b_first.py +11 -11
- scalebox/test/test_sandbox_async_comprehensive.py +736 -738
- scalebox/test/test_sandbox_stress_and_edge_cases.py +778 -778
- scalebox/test/test_sandbox_sync_comprehensive.py +779 -770
- scalebox/test/test_sandbox_usage_examples.py +987 -987
- scalebox/test/testacreate.py +24 -24
- scalebox/test/testagetinfo.py +18 -18
- scalebox/test/testcodeinterpreter_async.py +508 -508
- scalebox/test/testcodeinterpreter_sync.py +239 -239
- scalebox/test/testcomputeuse.py +245 -243
- scalebox/test/testnovnc.py +12 -12
- scalebox/test/testsandbox_async.py +202 -118
- scalebox/test/testsandbox_sync.py +71 -38
- scalebox/version.py +2 -2
- {scalebox_sdk-0.1.11.dist-info → scalebox_sdk-0.1.13.dist-info}/METADATA +1 -1
- {scalebox_sdk-0.1.11.dist-info → scalebox_sdk-0.1.13.dist-info}/RECORD +38 -36
- {scalebox_sdk-0.1.11.dist-info → scalebox_sdk-0.1.13.dist-info}/WHEEL +0 -0
- {scalebox_sdk-0.1.11.dist-info → scalebox_sdk-0.1.13.dist-info}/entry_points.txt +0 -0
- {scalebox_sdk-0.1.11.dist-info → scalebox_sdk-0.1.13.dist-info}/licenses/LICENSE +0 -0
- {scalebox_sdk-0.1.11.dist-info → scalebox_sdk-0.1.13.dist-info}/top_level.txt +0 -0
scalebox/test/test_basic.py
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
Basic tests to verify the package can be imported and basic functionality works.
|
|
4
|
-
These tests don't require external services or complex dependencies.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
import pytest
|
|
8
|
-
|
|
9
|
-
from scalebox import __version__
|
|
10
|
-
from scalebox.exceptions import (
|
|
11
|
-
AuthenticationException,
|
|
12
|
-
SandboxException,
|
|
13
|
-
TimeoutException,
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def test_package_version():
|
|
18
|
-
"""Test that the package version can be imported."""
|
|
19
|
-
assert __version__ is not None
|
|
20
|
-
assert isinstance(__version__, str)
|
|
21
|
-
assert len(__version__) > 0
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def test_exceptions_can_be_imported():
|
|
25
|
-
"""Test that all exceptions can be imported."""
|
|
26
|
-
# Test that exceptions can be instantiated
|
|
27
|
-
auth_error = AuthenticationException("Test auth error")
|
|
28
|
-
assert str(auth_error) == "Test auth error"
|
|
29
|
-
|
|
30
|
-
sandbox_error = SandboxException("Test sandbox error")
|
|
31
|
-
assert str(sandbox_error) == "Test sandbox error"
|
|
32
|
-
|
|
33
|
-
timeout_error = TimeoutException("Test timeout error")
|
|
34
|
-
assert str(timeout_error) == "Test timeout error"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
def test_package_imports():
|
|
38
|
-
"""Test that main package components can be imported."""
|
|
39
|
-
from scalebox import AsyncSandbox, Client, Sandbox
|
|
40
|
-
|
|
41
|
-
# Test that classes can be instantiated (basic check)
|
|
42
|
-
assert Client is not None
|
|
43
|
-
assert Sandbox is not None
|
|
44
|
-
assert AsyncSandbox is not None
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
def test_version_info():
|
|
48
|
-
"""Test version info functions."""
|
|
49
|
-
from scalebox.version import get_version, get_version_info
|
|
50
|
-
|
|
51
|
-
version = get_version()
|
|
52
|
-
assert isinstance(version, str)
|
|
53
|
-
assert len(version) > 0
|
|
54
|
-
|
|
55
|
-
version_info = get_version_info()
|
|
56
|
-
assert isinstance(version_info, tuple)
|
|
57
|
-
assert len(version_info) == 3
|
|
58
|
-
assert all(isinstance(x, int) for x in version_info)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
def test_basic_functionality():
|
|
62
|
-
"""Test basic functionality without external dependencies."""
|
|
63
|
-
# Test that we can create basic objects without external services
|
|
64
|
-
from scalebox.exceptions import AuthenticationException
|
|
65
|
-
|
|
66
|
-
# Test exception creation and message handling
|
|
67
|
-
error = AuthenticationException("Test message")
|
|
68
|
-
assert "Test message" in str(error)
|
|
69
|
-
|
|
70
|
-
# Test that we can import and use basic utilities
|
|
71
|
-
from scalebox.version import get_version
|
|
72
|
-
|
|
73
|
-
version = get_version()
|
|
74
|
-
assert version is not None
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if __name__ == "__main__":
|
|
78
|
-
pytest.main([__file__])
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Basic tests to verify the package can be imported and basic functionality works.
|
|
4
|
+
These tests don't require external services or complex dependencies.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import pytest
|
|
8
|
+
|
|
9
|
+
from scalebox import __version__
|
|
10
|
+
from scalebox.exceptions import (
|
|
11
|
+
AuthenticationException,
|
|
12
|
+
SandboxException,
|
|
13
|
+
TimeoutException,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def test_package_version():
|
|
18
|
+
"""Test that the package version can be imported."""
|
|
19
|
+
assert __version__ is not None
|
|
20
|
+
assert isinstance(__version__, str)
|
|
21
|
+
assert len(__version__) > 0
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def test_exceptions_can_be_imported():
|
|
25
|
+
"""Test that all exceptions can be imported."""
|
|
26
|
+
# Test that exceptions can be instantiated
|
|
27
|
+
auth_error = AuthenticationException("Test auth error")
|
|
28
|
+
assert str(auth_error) == "Test auth error"
|
|
29
|
+
|
|
30
|
+
sandbox_error = SandboxException("Test sandbox error")
|
|
31
|
+
assert str(sandbox_error) == "Test sandbox error"
|
|
32
|
+
|
|
33
|
+
timeout_error = TimeoutException("Test timeout error")
|
|
34
|
+
assert str(timeout_error) == "Test timeout error"
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def test_package_imports():
|
|
38
|
+
"""Test that main package components can be imported."""
|
|
39
|
+
from scalebox import AsyncSandbox, Client, Sandbox
|
|
40
|
+
|
|
41
|
+
# Test that classes can be instantiated (basic check)
|
|
42
|
+
assert Client is not None
|
|
43
|
+
assert Sandbox is not None
|
|
44
|
+
assert AsyncSandbox is not None
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def test_version_info():
|
|
48
|
+
"""Test version info functions."""
|
|
49
|
+
from scalebox.version import get_version, get_version_info
|
|
50
|
+
|
|
51
|
+
version = get_version()
|
|
52
|
+
assert isinstance(version, str)
|
|
53
|
+
assert len(version) > 0
|
|
54
|
+
|
|
55
|
+
version_info = get_version_info()
|
|
56
|
+
assert isinstance(version_info, tuple)
|
|
57
|
+
assert len(version_info) == 3
|
|
58
|
+
assert all(isinstance(x, int) for x in version_info)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def test_basic_functionality():
|
|
62
|
+
"""Test basic functionality without external dependencies."""
|
|
63
|
+
# Test that we can create basic objects without external services
|
|
64
|
+
from scalebox.exceptions import AuthenticationException
|
|
65
|
+
|
|
66
|
+
# Test exception creation and message handling
|
|
67
|
+
error = AuthenticationException("Test message")
|
|
68
|
+
assert "Test message" in str(error)
|
|
69
|
+
|
|
70
|
+
# Test that we can import and use basic utilities
|
|
71
|
+
from scalebox.version import get_version
|
|
72
|
+
|
|
73
|
+
version = get_version()
|
|
74
|
+
assert version is not None
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
if __name__ == "__main__":
|
|
78
|
+
pytest.main([__file__])
|