Copyleft Games

Test suite for HTML5+SVG

Many of our design tasks (including Intro to Web Design) ask for well-formatted, compact SVG. It would be great for mentors and students alike to have a Python-based test suite to test for common problems.

Write a Python unit test suite to take an input HTML5 document containing one or more SVG elements and test them for valid XML, HTML5 doctype, at least one element inside , proper element with the necessary attributes, all positions expressed in whole numbers, style information using CSS instead of hard-coded attributes, etc.

Ideally, you will have completed Intro to Web Design already or have experience working with SVG in HTML5.

When you're finished, upload your .py to this task.

Task tags

  • python
  • svg
  • unittest
  • html
  • css

Students who completed this task

kinshukk

Task type

  • code Code
  • assessment Outreach / Research
  • done_all Quality Assurance
close

2015