File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change 1- """Unit tests for the RemoteNode and LocalNode classes."""
21import unittest
32
43import canopen
5- import canopen .network
6- import canopen .objectdictionary
74
85
96def count_subscribers (network : canopen .Network ) -> int :
107 """Count the number of subscribers in the network."""
11- return sum (
12- len (n ) for n in network .subscribers .values ()
13- )
8+ return sum (len (n ) for n in network .subscribers .values ())
149
1510
1611class TestLocalNode (unittest .TestCase ):
17- """Unit tests for the LocalNode class."""
1812
1913 @classmethod
2014 def setUpClass (cls ):
@@ -29,7 +23,6 @@ def tearDownClass(cls):
2923 cls .network .disconnect ()
3024
3125 def test_associate_network (self ):
32-
3326 # Need to store the number of subscribers before associating because the
3427 # network implementation automatically adds subscribers to the list
3528 n_subscribers = count_subscribers (self .network )
@@ -65,7 +58,6 @@ def test_associate_network(self):
6558
6659
6760class TestRemoteNode (unittest .TestCase ):
68- """Unittests for the RemoteNode class."""
6961
7062 @classmethod
7163 def setUpClass (cls ):
@@ -80,7 +72,6 @@ def tearDownClass(cls):
8072 cls .network .disconnect ()
8173
8274 def test_associate_network (self ):
83-
8475 # Need to store the number of subscribers before associating because the
8576 # network implementation automatically adds subscribers to the list
8677 n_subscribers = count_subscribers (self .network )
You can’t perform that action at this time.
0 commit comments