Skip to content

Commit

Permalink
add reentrant install/uninstall test
Browse files Browse the repository at this point in the history
bckohan committed Jan 8, 2025
1 parent 5f1c94d commit 17abfeb
Showing 3 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/shellcompletion/__init__.py
Original file line number Diff line number Diff line change
@@ -362,6 +362,18 @@ def test_pythonpath_pass_through(self):
)
self.assertIn("working", completions)

def test_reentrant_install_uninstall(self):
self.install()
self.install()
self.verify_install()

completions = self.get_completions(self.launch_script, "complet")
self.assertIn("completion", completions)

self.remove()
self.remove()
self.verify_remove()


class _ScriptCompleteTestCase(_CompleteTestCase):
manage_script: str = "manage.py"
3 changes: 3 additions & 0 deletions tests/shellcompletion/test_fish.py
Original file line number Diff line number Diff line change
@@ -59,6 +59,9 @@ def test_pythonpath_pass_through(self): ...
@pytest.mark.skip(reason="fish does not support script installations")
def test_fallback(self): ...

@pytest.mark.skip(reason="fish does not support script installations")
def test_reentrant_install_uninstall(self): ...


@pytest.mark.skipif(shutil.which("fish") is None, reason="Fish not available")
class FishExeShellTests(_FishMixin, _InstalledScriptCompleteTestCase, TestCase):
3 changes: 3 additions & 0 deletions tests/shellcompletion/test_powershell.py
Original file line number Diff line number Diff line change
@@ -81,6 +81,9 @@ def test_pythonpath_pass_through(self): ...
@pytest.mark.skip(reason="powershell does not support script installations")
def test_fallback(self): ...

@pytest.mark.skip(reason="powershell does not support script installations")
def test_reentrant_install_uninstall(self): ...


@pytest.mark.skipif(
shutil.which("powershell") is None, reason="Powershell not available"

0 comments on commit 17abfeb

Please sign in to comment.