How to use the podman.NoContainersInPod function in podman

To help you get started, we’ve selected a few podman examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github containers / python-podman / test / test_pods_no_ctnrs.py View on Github external
def test_045_raises_no_ctnrs(self):
        global ident, pod

        with self.assertRaises(podman.NoContainersInPod):
            pod.start()

        with self.assertRaises(podman.NoContainersInPod):
            pod.restart()

        with self.assertRaises(podman.NoContainerRunning):
            next(pod.stats())

        with self.assertRaises(podman.ErrorOccurred):
            pod.top()
github containers / python-podman / test / test_pods_no_ctnrs.py View on Github external
def test_045_raises_no_ctnrs(self):
        global ident, pod

        with self.assertRaises(podman.NoContainersInPod):
            pod.start()

        with self.assertRaises(podman.NoContainersInPod):
            pod.restart()

        with self.assertRaises(podman.NoContainerRunning):
            next(pod.stats())

        with self.assertRaises(podman.ErrorOccurred):
            pod.top()