I'll let Scott answer for El Capitan, but for Sierra, here's the reproduction.
On MacOS Sierra:
address@hidden:~$ mkdir -p foo/bar
address@hidden:~$ rm -r foo
address@hidden:~$ mkdir -p foo/bar
address@hidden:~$ chmod 0000 foo/bar
address@hidden:~$ rm -r foo
rm: foo/bar: Permission denied
rm: foo: Directory not empty
address@hidden:~$ rm -rf foo
rm: foo/bar: Permission denied
rm: foo: Directory not empty
On Linux:
address@hidden:~$ mkdir -p foo/bar
address@hidden:~$ rm -r foo
address@hidden:~$ mkdir -p foo/bar
address@hidden:~$ chmod 0000 foo/bar
address@hidden:~$ rm -r foo
rm: descend into write-protected directory 'foo/bar'? y
rm: remove write-protected directory 'foo/bar'? y
address@hidden:~$ rm -rf foo
It's a fairly major difference if you expect 'rm -rf' to remove everything you own. This happens in two tests in testing/functional/test_selection.py, TestLockedFoldersNoError, lines 982 and 999, at the statements 986 and 1005, thus the check for platform before those tests.
...Ken