def test_fonts(self):
     text = "Hello Robbie!"
     self.assertEqual(cgitb.small(text), "<small>{}</small>".format(text))
     self.assertEqual(cgitb.strong(text),
                      "<strong>{}</strong>".format(text))
     self.assertEqual(cgitb.grey(text),
                      '<font color="#909090">{}</font>'.format(text))
 def test_blanks(self):
     self.assertEqual(cgitb.small(""), "")
     self.assertEqual(cgitb.strong(""), "")
     self.assertEqual(cgitb.grey(""), "")
Пример #3
0
 def test_fonts(self):
     text = "Hello Robbie!"
     self.assertEqual(cgitb.small(text), "<small>{}</small>".format(text))
     self.assertEqual(cgitb.strong(text), "<strong>{}</strong>".format(text))
     self.assertEqual(cgitb.grey(text),
                      '<font color="#909090">{}</font>'.format(text))
Пример #4
0
 def test_blanks(self):
     self.assertEqual(cgitb.small(""), "")
     self.assertEqual(cgitb.strong(""), "")
     self.assertEqual(cgitb.grey(""), "")
Пример #5
0
 def test_blanks(self):
     self.assertEqual(cgitb.small(''), '')
     self.assertEqual(cgitb.strong(''), '')
     self.assertEqual(cgitb.grey(''), '')
Пример #6
0
    # text(default_cell_number, 'jobTitle.text')  # break # elif "Jr" in jobTitle.text:
    # print(type(matches)) for match in matches: print(match.text.strip())
    # text(default_cell_number, 'jobTitle.text')  # break


def main():
    db_print(f"{DEFAULT_PARSER}")
    wps = WebPageSet([], check_links=True, maxlen=100)
    wps.append(WebPage('https://www.google.com'))
    wps.append(WebPage('fake page'))
    wps.append('fake page')


if __name__ == "__main__":
    cgitb.enable()
    db_print(cgitb.grey('test grey font'))
    try:
        app.run()
    except:
        pass

    # start_response('200 OK', [('Content-Type', 'text/html')])
    main()

# References
""" Choice of parser

    I use BeautifulSoup to work with html documents.

        Beautiful Soup is a Python library for pulling data out of HTML and XML files. It works with your favorite parser to provide idiomatic ways of navigating, searching, and modifying the parse tree. It commonly saves programmers hours or days of work.
Пример #7
0
 def update_event(self, inp=-1):
     self.set_output_val(0, cgitb.grey(self.input(0)))