Esempio n. 1
0
    def test_output(self):
        p = Person()
        p.body = 1
        p.strength = 2
        p.dex = 3
        p.intelligence = 4
        p.charisma = 5
        p.will = 6

        out = StringIO()
        p.print_stats(out=out)
        output = out.getvalue().strip()
        self.assertEqual(output, '1:2:3:4:5:6')
Esempio n. 2
0
  def test_output(self):
      p = Person()
      p.body = 1
      p.strength = 2
      p.dex = 3
      p.intelligence = 4
      p.charisma = 5
      p.will = 6

      out = StringIO()
      p.print_stats(out=out)
      output = out.getvalue().strip()
      self.assertEqual(output,'1:2:3:4:5:6')
Esempio n. 3
0
 def test_viable(self):
     p = Person()
     p.body = 0
     self.assertFalse(p.viable())
     p.body = 1
     p.strength = 1
     p.intelligence = 1
     p.charisma = 1
     p.will = 1
     p.dex = 1
     self.assertTrue(p.viable())
     for dstat in ["body","strength","intelligence","charisma","will","dex"]:
         p.__dict__[dstat] = 0
         self.assertFalse(p.viable())
         p.__dict__[dstat] = 1
Esempio n. 4
0
 def test_viable(self):
     p = Person()
     p.body = 0
     self.assertFalse(p.viable())
     p.body = 1
     p.strength = 1
     p.intelligence = 1
     p.charisma = 1
     p.will = 1
     p.dex = 1
     self.assertTrue(p.viable())
     for dstat in [
             "body", "strength", "intelligence", "charisma", "will", "dex"
     ]:
         p.__dict__[dstat] = 0
         self.assertFalse(p.viable())
         p.__dict__[dstat] = 1