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

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 

5 

6 

7class ChannelABC(metaclass=abc.ABCMeta): 

8 """A base class for all channel ABCs.""" 

9 

10 @abc.abstractmethod 

11 def start(self): 

12 """Start the channel.""" 

13 pass 

14 

15 @abc.abstractmethod 

16 def stop(self): 

17 """Stop the channel.""" 

18 pass 

19 

20 @abc.abstractmethod 

21 def is_alive(self): 

22 """Test whether the channel is alive.""" 

23 pass 

24 

25 

26class HBChannelABC(ChannelABC): 

27 """HBChannel ABC. 

28 

29 The docstrings for this class can be found in the base implementation: 

30 

31 `jupyter_client.channels.HBChannel` 

32 """ 

33 

34 @abc.abstractproperty 

35 def time_to_dead(self): 

36 pass 

37 

38 @abc.abstractmethod 

39 def pause(self): 

40 """Pause the heartbeat channel.""" 

41 pass 

42 

43 @abc.abstractmethod 

44 def unpause(self): 

45 """Unpause the heartbeat channel.""" 

46 pass 

47 

48 @abc.abstractmethod 

49 def is_beating(self): 

50 """Test whether the channel is beating.""" 

51 pass