old_contents: import vanilla
  
  
  def test_process():
      h = vanilla.Hub()
      child = h.process.execv(['/usr/bin/env', 'grep', '--line-buffered', 'foo'])
      child.stdin.send('foo1\n')
      assert child.stdout.recv() == 'foo1\n'
      child.stdin.send('bar1\n')
      child.stdin.send('foo2\n')
      assert child.stdout.recv() == 'foo2\n'
  
new_contents: import vanilla
  
  
  class TestProcess(object):
      def test_basic(self):
          h = vanilla.Hub()
          child = h.process.execv(
              ['/usr/bin/env', 'grep', '--line-buffered', 'foo'])
          child.stdin.send('foo1\n')
          assert child.stdout.recv() == 'foo1\n'
          child.stdin.send('bar1\n')
          child.stdin.send('foo2\n')
          assert child.stdout.recv() == 'foo2\n'
  
      def test_stderr(self):
          h = vanilla.Hub()
          child = h.process.execv(['/usr/bin/env', 'grep', '-g'])
          assert child.stderr.recv() == "grep: invalid option -- 'g'\n"
  
subject: add a test for stderr