def test_validate_invalid_count_thread(self): accepted = False thread = 10 try: validate.thread(thread) except ValueError as e: accepted = True assert accepted
def test_validate_valid_thread(self): accepted = True thread = 1 try: validate.thread(thread) except ValueError as e: accepted = False assert accepted
def test_validate_invalid_str_thread(self): accepted = False thread = 'foobar' try: validate.thread(thread) except ValueError as e: accepted = True assert accepted
def parse_threads(self): """determine threads""" if self.options['threads'] is None: return settings.threads() validate.thread(self.options["threads"]) return self.options['threads']