コード例 #1
0
 def test_two_parallel(self):
     assert set(map(str, Bridge._all_bridges_from_components([
         Component.from_string('0/1'), Component.from_string('0/2')]))) == \
            {'0/1', '0/2'}
コード例 #2
0
 def test_single(self):
     assert set(map(str, Bridge._all_bridges_from_components([
         Component.from_string('0/1')]))) == {'0/1'}
コード例 #3
0
 def test_single_incompatible(self):
     assert set(map(str, Bridge._all_bridges_from_components([
         Component.from_string('1/1')]))) == set()
コード例 #4
0
 def test_empty(self):
     assert list(Bridge._all_bridges_from_components([])) == []