SF bug #1460340:  random.sample can raise KeyError

Fix the hit and miss style of testing for sets and dicts.
2 files changed