Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/jupyter_client/channelsabc.py: 71%
24 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-07-01 06:54 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-07-01 06:54 +0000
1"""Abstract base classes for kernel client channels"""
2# Copyright (c) Jupyter Development Team.
3# Distributed under the terms of the Modified BSD License.
4import abc
7class ChannelABC(metaclass=abc.ABCMeta):
8 """A base class for all channel ABCs."""
10 @abc.abstractmethod
11 def start(self):
12 """Start the channel."""
13 pass
15 @abc.abstractmethod
16 def stop(self):
17 """Stop the channel."""
18 pass
20 @abc.abstractmethod
21 def is_alive(self):
22 """Test whether the channel is alive."""
23 pass
26class HBChannelABC(ChannelABC):
27 """HBChannel ABC.
29 The docstrings for this class can be found in the base implementation:
31 `jupyter_client.channels.HBChannel`
32 """
34 @abc.abstractproperty
35 def time_to_dead(self):
36 pass
38 @abc.abstractmethod
39 def pause(self):
40 """Pause the heartbeat channel."""
41 pass
43 @abc.abstractmethod
44 def unpause(self):
45 """Unpause the heartbeat channel."""
46 pass
48 @abc.abstractmethod
49 def is_beating(self):
50 """Test whether the channel is beating."""
51 pass