def __init__(self, *, num_threads: int = 1, ramp_time: int = 0, continue_forever: bool = False, loops: int = None, delayed_start: bool = False, is_sheduler_enable: bool = False, sheduler_duration: int = None, sheduler_delay: int = None, on_sample_error: ThreadGroupAction = ThreadGroupAction.CONTINUE, name: str = 'Thread Group', comments: str = '', is_enabled: bool = True,): self.delayed_start = delayed_start BasicStandartThreadGroup.__init__(self, name=name, comments=comments, is_enabled=is_enabled, num_threads=num_threads, ramp_time=ramp_time, continue_forever=continue_forever, loops=loops, is_sheduler_enable=is_sheduler_enable, sheduler_duration=sheduler_duration, sheduler_delay=sheduler_delay, on_sample_error=on_sample_error)
def test_check2(self): with pytest.raises(TypeError): BasicStandartThreadGroup(is_sheduler_enable=1)
def test_positive(self): btg = BasicStandartThreadGroup(num_threads=10) assert btg.num_threads == 10
def test_negative(self): with pytest.raises(TypeError): BasicStandartThreadGroup(loops=-4)
def test_zero(self): BasicStandartThreadGroup(loops=0)
def test_positive(self): BasicStandartThreadGroup(loops=23)
def test_check(self): with pytest.raises(TypeError): BasicStandartThreadGroup(is_sheduler_enable=True, sheduler_delay="1")
def test_positive(self): BasicStandartThreadGroup(is_sheduler_enable=True, sheduler_delay=1)
def test_positive(self): BasicStandartThreadGroup(continue_forever=True)
def test_check2(self): with pytest.raises(TypeError): BasicStandartThreadGroup(continue_forever=1)
def test_check(self): with pytest.raises(TypeError): BasicStandartThreadGroup(ramp_time='25')
def test_positive(self): btg = BasicStandartThreadGroup(ramp_time=25) assert btg.ramp_time == 25
def test_null_check(self): with pytest.raises(TypeError): BasicStandartThreadGroup(num_threads=0)
def test_less_more_check(self): with pytest.raises(TypeError): BasicStandartThreadGroup(num_threads=-5)
def test_check(self): with pytest.raises(ValueError): BasicStandartThreadGroup(sheduler_duration=23)
def test_check2(self): with pytest.raises(ValueError): BasicStandartThreadGroup(sheduler_delay=1)
def test_check(self): with pytest.raises(ValueError): BasicStandartThreadGroup(continue_forever=True, loops=1)
def test_positive1(self): BasicStandartThreadGroup(is_sheduler_enable=True, sheduler_duration=1)
def test_check2(self): with pytest.raises(TypeError): BasicStandartThreadGroup(loops="a")