made tests for %r and %R more robust