Beispiel #1
0
    def test_get_mass(self):
        chunk = Chunk()
        self.assertEquals(chunk.get_mass(), 0.0, "bad initial mass")

        shard1 = Disc(gold, 5)
        shard2 = Block(gold, self.unitsquare)
        chunk.shards = [shard1, shard2]
        self.assertEquals(chunk.get_mass(), (25 * pi + 1) * gold.density,
            "bad mass")