def test_lists_formats(self): pfg.main(["pfg", "list-formats", "cairo"]) formats = pfg.list_formats("cairo") output = self.get_stdout_without_error() for f in formats: self.assertIn(f, output)
def test_reports_unknown_family_for_list_formats(self): pfg.main(["pfg", "list-formats", "unknown_family"]) formats = pfg.list_formats("unknown_family") error = self.get_stderr_without_output() self.assertIn("Unknown", error) self.assertIn("unknown_family", error)
def test_lists_formats(self): for pfg_family in pfg.commands.families: family = pfg_family.__name__.replace("pfg.", "") formats = pfg.list_formats(family) self.assertGreater(len(formats), 0)