feat: major architectural refactor to 5.1b1 - Service Layer, gRPC & Agent evolution (fragmented secrets)
This commit is contained in:
@@ -64,7 +64,7 @@ el.replaceWith(d);
|
||||
subdir = tmp_path / "subdir"
|
||||
subdir.mkdir()
|
||||
|
||||
result = _getcwd(["run", "run"], "run")
|
||||
result = get_cwd(["run", "run"])
|
||||
# Should list files
|
||||
assert any("file1.txt" in r for r in result)
|
||||
assert any("subdir/" in r for r in result)
|
||||
@@ -75,7 +75,7 @@ el.replaceWith(d);
|
||||
(tmp_path / "script.yaml").touch()
|
||||
(tmp_path / "script2.yaml").touch()
|
||||
|
||||
result = _getcwd(["run", "script"], "run")
|
||||
result = get_cwd(["run", "script"])
|
||||
assert any("script" in r for r in result)
|
||||
|
||||
def test_folder_only(self, tmp_path, monkeypatch):
|
||||
@@ -85,7 +85,7 @@ el.replaceWith(d);
|
||||
subdir = tmp_path / "mydir"
|
||||
subdir.mkdir()
|
||||
|
||||
result = _getcwd(["export", "export"], "export", folderonly=True)
|
||||
result = get_cwd(["export", "export"], folderonly=True)
|
||||
files_in_result = [r for r in result if "file.txt" in r]
|
||||
assert len(files_in_result) == 0
|
||||
dirs_in_result = [r for r in result if "mydir" in r]
|
||||
@@ -110,7 +110,7 @@ el.replaceWith(d);
|
||||
subdir = tmp_path / "subdir"
|
||||
subdir.mkdir()
|
||||
|
||||
result = _getcwd(["run", "run"], "run")
|
||||
result = get_cwd(["run", "run"])
|
||||
# Should list files
|
||||
assert any("file1.txt" in r for r in result)
|
||||
assert any("subdir/" in r for r in result)</code></pre>
|
||||
@@ -132,7 +132,7 @@ el.replaceWith(d);
|
||||
subdir = tmp_path / "mydir"
|
||||
subdir.mkdir()
|
||||
|
||||
result = _getcwd(["export", "export"], "export", folderonly=True)
|
||||
result = get_cwd(["export", "export"], folderonly=True)
|
||||
files_in_result = [r for r in result if "file.txt" in r]
|
||||
assert len(files_in_result) == 0
|
||||
dirs_in_result = [r for r in result if "mydir" in r]
|
||||
@@ -154,179 +154,13 @@ el.replaceWith(d);
|
||||
(tmp_path / "script.yaml").touch()
|
||||
(tmp_path / "script2.yaml").touch()
|
||||
|
||||
result = _getcwd(["run", "script"], "run")
|
||||
result = get_cwd(["run", "script"])
|
||||
assert any("script" in r for r in result)</code></pre>
|
||||
</details>
|
||||
<div class="desc"><p>Lists files matching a partial path.</p></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt id="connpy.tests.test_completion.TestGetPlugins"><code class="flex name class">
|
||||
<span>class <span class="ident">TestGetPlugins</span></span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">class TestGetPlugins:
|
||||
def test_get_plugins_disable(self, tmp_path):
|
||||
"""--disable returns enabled plugins."""
|
||||
plugin_dir = tmp_path / "plugins"
|
||||
plugin_dir.mkdir()
|
||||
(plugin_dir / "active.py").touch()
|
||||
(plugin_dir / "disabled.py.bkp").touch()
|
||||
|
||||
result = _get_plugins("--disable", str(tmp_path))
|
||||
assert "active" in result
|
||||
assert "disabled" not in result
|
||||
|
||||
def test_get_plugins_enable(self, tmp_path):
|
||||
"""--enable returns disabled plugins."""
|
||||
plugin_dir = tmp_path / "plugins"
|
||||
plugin_dir.mkdir()
|
||||
(plugin_dir / "active.py").touch()
|
||||
(plugin_dir / "disabled.py.bkp").touch()
|
||||
|
||||
result = _get_plugins("--enable", str(tmp_path))
|
||||
assert "disabled" in result
|
||||
assert "active" not in result
|
||||
|
||||
def test_get_plugins_del(self, tmp_path):
|
||||
"""--del returns all plugins."""
|
||||
plugin_dir = tmp_path / "plugins"
|
||||
plugin_dir.mkdir()
|
||||
(plugin_dir / "active.py").touch()
|
||||
(plugin_dir / "disabled.py.bkp").touch()
|
||||
|
||||
result = _get_plugins("--del", str(tmp_path))
|
||||
assert "active" in result
|
||||
assert "disabled" in result
|
||||
|
||||
def test_get_plugins_all(self, tmp_path):
|
||||
"""'all' returns dict with paths."""
|
||||
plugin_dir = tmp_path / "plugins"
|
||||
plugin_dir.mkdir()
|
||||
(plugin_dir / "myplugin.py").touch()
|
||||
|
||||
result = _get_plugins("all", str(tmp_path))
|
||||
assert isinstance(result, dict)
|
||||
assert "myplugin" in result
|
||||
|
||||
def test_get_plugins_empty_dir(self, tmp_path):
|
||||
"""Empty plugins directory returns empty list."""
|
||||
plugin_dir = tmp_path / "plugins"
|
||||
plugin_dir.mkdir()
|
||||
|
||||
result = _get_plugins("--disable", str(tmp_path))
|
||||
assert result == []</code></pre>
|
||||
</details>
|
||||
<div class="desc"></div>
|
||||
<h3>Methods</h3>
|
||||
<dl>
|
||||
<dt id="connpy.tests.test_completion.TestGetPlugins.test_get_plugins_all"><code class="name flex">
|
||||
<span>def <span class="ident">test_get_plugins_all</span></span>(<span>self, tmp_path)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">def test_get_plugins_all(self, tmp_path):
|
||||
"""'all' returns dict with paths."""
|
||||
plugin_dir = tmp_path / "plugins"
|
||||
plugin_dir.mkdir()
|
||||
(plugin_dir / "myplugin.py").touch()
|
||||
|
||||
result = _get_plugins("all", str(tmp_path))
|
||||
assert isinstance(result, dict)
|
||||
assert "myplugin" in result</code></pre>
|
||||
</details>
|
||||
<div class="desc"><p>'all' returns dict with paths.</p></div>
|
||||
</dd>
|
||||
<dt id="connpy.tests.test_completion.TestGetPlugins.test_get_plugins_del"><code class="name flex">
|
||||
<span>def <span class="ident">test_get_plugins_del</span></span>(<span>self, tmp_path)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">def test_get_plugins_del(self, tmp_path):
|
||||
"""--del returns all plugins."""
|
||||
plugin_dir = tmp_path / "plugins"
|
||||
plugin_dir.mkdir()
|
||||
(plugin_dir / "active.py").touch()
|
||||
(plugin_dir / "disabled.py.bkp").touch()
|
||||
|
||||
result = _get_plugins("--del", str(tmp_path))
|
||||
assert "active" in result
|
||||
assert "disabled" in result</code></pre>
|
||||
</details>
|
||||
<div class="desc"><p>–del returns all plugins.</p></div>
|
||||
</dd>
|
||||
<dt id="connpy.tests.test_completion.TestGetPlugins.test_get_plugins_disable"><code class="name flex">
|
||||
<span>def <span class="ident">test_get_plugins_disable</span></span>(<span>self, tmp_path)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">def test_get_plugins_disable(self, tmp_path):
|
||||
"""--disable returns enabled plugins."""
|
||||
plugin_dir = tmp_path / "plugins"
|
||||
plugin_dir.mkdir()
|
||||
(plugin_dir / "active.py").touch()
|
||||
(plugin_dir / "disabled.py.bkp").touch()
|
||||
|
||||
result = _get_plugins("--disable", str(tmp_path))
|
||||
assert "active" in result
|
||||
assert "disabled" not in result</code></pre>
|
||||
</details>
|
||||
<div class="desc"><p>–disable returns enabled plugins.</p></div>
|
||||
</dd>
|
||||
<dt id="connpy.tests.test_completion.TestGetPlugins.test_get_plugins_empty_dir"><code class="name flex">
|
||||
<span>def <span class="ident">test_get_plugins_empty_dir</span></span>(<span>self, tmp_path)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">def test_get_plugins_empty_dir(self, tmp_path):
|
||||
"""Empty plugins directory returns empty list."""
|
||||
plugin_dir = tmp_path / "plugins"
|
||||
plugin_dir.mkdir()
|
||||
|
||||
result = _get_plugins("--disable", str(tmp_path))
|
||||
assert result == []</code></pre>
|
||||
</details>
|
||||
<div class="desc"><p>Empty plugins directory returns empty list.</p></div>
|
||||
</dd>
|
||||
<dt id="connpy.tests.test_completion.TestGetPlugins.test_get_plugins_enable"><code class="name flex">
|
||||
<span>def <span class="ident">test_get_plugins_enable</span></span>(<span>self, tmp_path)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">def test_get_plugins_enable(self, tmp_path):
|
||||
"""--enable returns disabled plugins."""
|
||||
plugin_dir = tmp_path / "plugins"
|
||||
plugin_dir.mkdir()
|
||||
(plugin_dir / "active.py").touch()
|
||||
(plugin_dir / "disabled.py.bkp").touch()
|
||||
|
||||
result = _get_plugins("--enable", str(tmp_path))
|
||||
assert "disabled" in result
|
||||
assert "active" not in result</code></pre>
|
||||
</details>
|
||||
<div class="desc"><p>–enable returns disabled plugins.</p></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt id="connpy.tests.test_completion.TestLoadTxtCache"><code class="flex name class">
|
||||
<span>class <span class="ident">TestLoadTxtCache</span></span>
|
||||
</code></dt>
|
||||
@@ -411,16 +245,6 @@ el.replaceWith(d);
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h4><code><a title="connpy.tests.test_completion.TestGetPlugins" href="#connpy.tests.test_completion.TestGetPlugins">TestGetPlugins</a></code></h4>
|
||||
<ul class="">
|
||||
<li><code><a title="connpy.tests.test_completion.TestGetPlugins.test_get_plugins_all" href="#connpy.tests.test_completion.TestGetPlugins.test_get_plugins_all">test_get_plugins_all</a></code></li>
|
||||
<li><code><a title="connpy.tests.test_completion.TestGetPlugins.test_get_plugins_del" href="#connpy.tests.test_completion.TestGetPlugins.test_get_plugins_del">test_get_plugins_del</a></code></li>
|
||||
<li><code><a title="connpy.tests.test_completion.TestGetPlugins.test_get_plugins_disable" href="#connpy.tests.test_completion.TestGetPlugins.test_get_plugins_disable">test_get_plugins_disable</a></code></li>
|
||||
<li><code><a title="connpy.tests.test_completion.TestGetPlugins.test_get_plugins_empty_dir" href="#connpy.tests.test_completion.TestGetPlugins.test_get_plugins_empty_dir">test_get_plugins_empty_dir</a></code></li>
|
||||
<li><code><a title="connpy.tests.test_completion.TestGetPlugins.test_get_plugins_enable" href="#connpy.tests.test_completion.TestGetPlugins.test_get_plugins_enable">test_get_plugins_enable</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h4><code><a title="connpy.tests.test_completion.TestLoadTxtCache" href="#connpy.tests.test_completion.TestLoadTxtCache">TestLoadTxtCache</a></code></h4>
|
||||
<ul class="">
|
||||
<li><code><a title="connpy.tests.test_completion.TestLoadTxtCache.test_load_existing_cache" href="#connpy.tests.test_completion.TestLoadTxtCache.test_load_existing_cache">test_load_existing_cache</a></code></li>
|
||||
|
||||
Reference in New Issue
Block a user