예제 #1
0
    def testOutputChannels(self):
        '''	Test that the Genotype calculates the right output channels. '''
        input = "R:/massive/testdata/cdl/man/CDL/embedded_simple.cdl"

        agentSpec = CDLReader.read(input, CDLReader.kEvolveTokens)
        geno = Genotype.Genotype(agentSpec)

        expectedChannels = [
            "ty", "rx", "ry", "rz", "height", "leg_length", "shirt_map",
            "walk", "walk_45L", "walk_sad", "walk->walk_45L", "walk->walk_sad",
            "walk_45L->walk", "walk_45L->walk_sad", "walk_sad->walk",
            "walk_sad->walk_45L", "walk:rate", "walk_45L:rate", "walk_sad:rate"
        ]

        self.assertEqual(sorted(expectedChannels),
                         sorted(geno.outputChannels()))
예제 #2
0
 def setUp(self):
     input = "R:/massive/testdata/cdl/man/CDL/noise.cdl"
     self.agentSpec = CDLReader.read(input, CDLReader.kEvolveTokens)
     self.geno = Genotype.Genotype(self.agentSpec)
     self.geno.rand = TestUtil.NotRandom()