Skip to content

Instantly share code, notes, and snippets.

@hgdeoro
Created March 17, 2011 14:38
Show Gist options
  • Save hgdeoro/874429 to your computer and use it in GitHub Desktop.
Save hgdeoro/874429 to your computer and use it in GitHub Desktop.
Using private function with unittest.assertRaises()
class SomeTest(unittest.TestCase):
.
.
.
def test_queue(self):
.
.
.
def check_finished_tasks():
for task_id in ids:
self.task_queue.get_result(task_id)
self.assertRaises(KeyError, check_finished_tasks)
.
.
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment