-2

can anybody help me please, what means (Pdb) up, (Pdb)list. In textbook Python Testing nobody solves this unfortunately. Thank You very much...

(Pdb) up
(Pdb) up`
(Pdb) list


 def test_add_method_returns_correct_result(self):
   print
   print
   print "Hello"
   self.assertEqual(3, self.calc.add(2,2))

 def test_add_method_raises_typeerror_if_not_ints(self):

   self.assertRaises(TypeError, self.calc.add, "Hello",
   "World")

if __name__ == '__main__': 
 (Pdb)self.calc.add(4,4) 
 (Pdb)
  # why sometimes is down here only this line if __name__ == 
  '__main__': 
  # and sometimes is here also 
  #**self.calc.add(4,4)**
  • Looks like the [Python debugger](https://docs.python.org/3/library/pdb.html)'s prompt, and a command (e.g., the `up` and `list`). You may need to complain to the publisher if the book doesn't explain this. – Robert Mar 21 '20 at 17:33

1 Answers1

1

(pdb) up: the command up is used to move one frame up from the stack

(pdb) list: displays the source code of the currently running program

You can find more informations about the pdb commands on the python documentation: https://docs.python.org/3/library/pdb.html