Beispiel #1
0
 def __init__(self, filename, enable_rich=True):
     self.filename = filename
     self.viewer = ProgShotViewer(filename)
     self.enable_rich = enable_rich
     self.console = Console()
     self.films_count = len(self.viewer.films)
     objprint.config(color=False, depth=6)
     self._switch_film(0)
Beispiel #2
0
 def test_config_element(self):
     config(elements=2)
     e = ObjTest({"first": 1, "second": 2, "third": 3})
     with io.StringIO() as buf, redirect_stdout(buf):
         objprint(e)
         output = buf.getvalue()
     self.assertIn("first", output)
     self.assertIn("second", output)
     self.assertNotIn("third", output)
     config(elements=None)
Beispiel #3
0
 def test_config(self):
     config(indent=4)
     config(indent=2)
Beispiel #4
0
 def test_config_none_exist(self):
     self.assertRaises(TypeError, lambda: config(height=50))