Skip to content

Commit

Permalink
test: Test executor open constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Aug 13, 2024
1 parent 67e3489 commit 970776b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/test_executor.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from collections.abc import Callable
from copy import deepcopy
from dataclasses import dataclass
from importlib import reload
Expand Down Expand Up @@ -186,10 +187,21 @@ def test_default_executor(tmp_path: Path, fake_platform: str, monkeypatch):


def test_context_manager(tmp_path: Path, executor: Executor):
path = tmp_path / "my-open-folder"
path = tmp_path / "my-ctx-folder"

executor.init(path)

with executor:
assert executor.meta is not None
assert executor.meta.start is not None


def test_open(tmp_path: Path):
path = tmp_path / "my-open-folder"

with Executor.open("myexec", path) as e:
assert isinstance(e.t1, Callable)
assert e.meta is not None
assert e.meta.start is not None

assert e.meta.end is not None

0 comments on commit 970776b

Please sign in to comment.