title: ValueError: source code string cannot contain null bytes
body: <pre><code>import hashlib
  
  
  def my_function(bytes_):
      """
      &gt;&gt;&gt; my_function(b'\0')
      '6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d'
      """
      return hashlib.sha256(bytes_).hexdigest()
  
  
  if __name__ == "__main__":
      import doctest
      doctest.testmod()
  </code></pre>
  
  <p><em>Expected behaviour:</em>  1 test passes</p>
  
  <p><em>Actual behaviour:</em> <code>ValueError</code> exception is raised from within <code>doctest.py</code>.</p>
  
  <p>I've tried to use <code>b'\x00'</code> literal as well with the same result.  How to use null bytes in doctest?  What exactly is the problem here, and is there any fix or not-too-ugly workaround?  </p>