testflows.machine 0.1.4__tar.gz → 0.1.5__tar.gz

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.
Files changed (25) hide show
  1. {testflows_machine-0.1.4/testflows.machine.egg-info → testflows_machine-0.1.5}/PKG-INFO +1 -1
  2. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/_version.py +1 -1
  3. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/errors.py +4 -1
  4. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/login.py +7 -2
  5. {testflows_machine-0.1.4 → testflows_machine-0.1.5/testflows.machine.egg-info}/PKG-INFO +1 -1
  6. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/LICENSE +0 -0
  7. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/NOTICE +0 -0
  8. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/README.md +0 -0
  9. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/pyproject.toml +0 -0
  10. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/setup.cfg +0 -0
  11. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/__init__.py +0 -0
  12. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/_args.py +0 -0
  13. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/_requires.py +0 -0
  14. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/_service.py +0 -0
  15. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/_warn.py +0 -0
  16. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/_when.py +0 -0
  17. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/client.py +0 -0
  18. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/disks.py +0 -0
  19. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/ping.py +0 -0
  20. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/results.py +0 -0
  21. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/runs.py +0 -0
  22. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows/machine/v1/sessions.py +0 -0
  23. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows.machine.egg-info/SOURCES.txt +0 -0
  24. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows.machine.egg-info/dependency_links.txt +0 -0
  25. {testflows_machine-0.1.4 → testflows_machine-0.1.5}/testflows.machine.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: testflows.machine
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Python SDK for TestFlows Machine, the deterministic execution environment
5
5
  Author-email: "Katteli Inc." <info@testflows.com>
6
6
  License-Expression: Apache-2.0
@@ -13,4 +13,4 @@
13
13
  # limitations under the License.
14
14
  """The SDK's version."""
15
15
 
16
- __version__ = "0.1.4"
16
+ __version__ = "0.1.5"
@@ -25,6 +25,7 @@ import contextlib
25
25
  from typing import Generator, Optional
26
26
 
27
27
  from testflows.machine._core import api
28
+ from testflows.machine._core import build
28
29
  from testflows.machine._core import disks
29
30
  from testflows.machine._core import ipc
30
31
  from testflows.machine._core import refused
@@ -43,7 +44,8 @@ class Error(Exception):
43
44
 
44
45
  class NotSignedIn(Error):
45
46
  """There are no credentials: no stored login and no
46
- TESTFLOWS_MACHINE_API_KEY.
47
+ TESTFLOWS_MACHINE_API_KEY. Also raised for an `api_url` that is not the
48
+ service the stored login signed in to: its credentials are not sent there.
47
49
 
48
50
  Sign in with `login.start` and `login.verify`, or `machine login`, or
49
51
  set TESTFLOWS_MACHINE_API_KEY.
@@ -162,6 +164,7 @@ _MAPPING: tuple[tuple[type[BaseException], type[Error]], ...] = (
162
164
  (_sessions.NameTaken, AlreadyExists),
163
165
  (_sessions.Unreachable, ServiceUnavailable),
164
166
  (disks.NotFound, NotFound),
167
+ (build.BuildError, InvalidArgument),
165
168
  (api.client.NotFound, NotFound),
166
169
  (api.client.Conflict, Conflict),
167
170
  (api.client.Forbidden, Forbidden),
@@ -95,12 +95,17 @@ def logout(*, everywhere: bool = False, api_url: Optional[str] = None) -> bool:
95
95
  Args:
96
96
  everywhere (bool, optional): Sign out every login of the account,
97
97
  on every machine. Defaults to False.
98
- api_url (str, optional): The service's URL; defaults to
99
- TESTFLOWS_MACHINE_API_URL, else the public service.
98
+ api_url (str, optional): The service the caller expects the login
99
+ to be for. The sign-out always goes to the login's own service;
100
+ another one is refused.
100
101
 
101
102
  Returns:
102
103
  bool: True when the service revoked the login; False when there was
103
104
  none, or the service could not be told.
105
+
106
+ Raises:
107
+ NotSignedIn: `api_url` is not the service the login signed in to.
108
+ The login is kept, and its credentials are not sent there.
104
109
  """
105
110
  with _translated():
106
111
  out = _login.logout(api_url, everywhere=everywhere)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: testflows.machine
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Python SDK for TestFlows Machine, the deterministic execution environment
5
5
  Author-email: "Katteli Inc." <info@testflows.com>
6
6
  License-Expression: Apache-2.0