예제 #1
0
 def test__sifting_feedback_hypernet(self):
     hnets = self._build_two_hypernets()
     hnets.append( self._build_hypernet('backwards', (80,20), [(80,95)]) )
     sifting_router.assign_tracks(hnets)
     
     tracks = {}
     for hn in hnets:
         print hn
예제 #2
0
    def test__sifting_feedback_hypernet(self):
        hnets = self._build_two_hypernets()
        hnets.append(self._build_hypernet('backwards', (80, 20), [(80, 95)]))
        sifting_router.assign_tracks(hnets)

        tracks = {}
        for hn in hnets:
            print hn
예제 #3
0
 def test__sifting_three_hypernets(self):
     hnets = self._build_three_hypernets()
     sifting_router.assign_tracks(hnets)
     
     expected = { 'spud' : 3, 'potato' : 2, 'mash': 1 }
     
     tracks = {}
     for hn in hnets:
         tracks[hn.netname] = hn.track
     assert tracks == expected
예제 #4
0
    def test__sifting_three_hypernets(self):
        hnets = self._build_three_hypernets()
        sifting_router.assign_tracks(hnets)

        expected = {'spud': 3, 'potato': 2, 'mash': 1}

        tracks = {}
        for hn in hnets:
            tracks[hn.netname] = hn.track
        assert tracks == expected