Print warnings while testing

See also #851