def test_variable(self):
        """
        If passed an input file containing a variable access, L{filter} writes
        a I{pre} tag containing a I{py-src-variable} span containing the
        variable.
        """
        input = BytesIO(b"foo\n")
        output = BytesIO()
        filter(input, output)
        self.assertEqual(
            output.getvalue(),
            b'<pre><span class="py-src-variable">foo</span>'
            b'<span class="py-src-newline">\n'
            b'</span><span class="py-src-endmarker"></span></pre>\n')

        If passed an input file containing a variable access, L{filter} writes
        a I{pre} tag containing a I{py-src-variable} span containing the
        variable.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_htmlizer.py