To borrow a phrase from old people, context managers (`with` statement operators) are the bee's knees. They basically put you in some state temporarily, and make sure you exit that state cleanly. It's why `with open(fname) as fid` is preferred -- it ensures `fid` *always* gets closed, even if you raise an error inside the `with` block.

Anyway, I'd make these minor changes:
```
with warnings.catch_warnings(record=True) as w:
    warnings.simplefilter('always')
    for setno in ['Left Auditory', 0, None]:
        read_evoked(fname, setno=setno)
        # ensure latest warning was of proper type
        assert_true(w[-1].category == DeprecationWarning)
    assert_equal(len(w), 3)  # assert we got the proper number
```
Feel free to omit the comments, I just wanted to show what I changed for you.

Not sure what's going on with the `assert_raises` code... I'd have to play around with that for a bit to figure it out.