test for context manager