No idea what pypy does but cpython with the -O flag will.
assert.py:
a = 0
def gadd(b):
global a
a = a + b
return a
assert gadd(1) == 1, 'a != 1'
print a
$python assert.py
1
$python -O assert.py
0