Add docstrings to test_threadlocal