@mock_streams('stderr')
def test_require_mixed_state_keys_prints_missing_only():
 try:
  require('foo', 'version')
 except SystemExit:
  err = sys.stderr.getvalue()
  assert ('version' not in err)
  assert ('foo' in err)

@ mock_streams ( 'stderr' ) def test_require_mixed_state_keys_prints_missing_only ( ) : try : require ( 'foo' , 'version' ) except SystemExit : err = sys . stderr . getvalue ( ) assert ( 'version' not in err ) assert ( 'foo' in err )
when given mixed-state keys .