Given that rdf2dot uses the now deprecated cgi stuff that was renamed in newer python versions, could we introduce a version check here to raise an exception (or warning) that the display_rdf() method won't work (I think it fails if you try to use 3.8.0 and above. The issue has been fixed, see e.g.
RDFLib/rdflib#1110
But the latest release of rdflib doesn't have it yet, and they don't seem to release super often...
Likewise, maybe we could skip these tests if the python version is 3.8.0 and above?