Exemplo n.º 1
0
def test_time_config_range_absolute():
    with pytest.raises(ValueError):
        TimeConfig().with_type(Time.Absolute).with_range(100)
Exemplo n.º 2
0
def test_time_config_end_relative():
    with pytest.raises(ValueError):
        TimeConfig().with_type(Time.Relative).with_end(100)
Exemplo n.º 3
0
def test_time_config_add_millis():
    expected = 100
    config = TimeConfig().__add_millis__(expected, 'foo')
    assert config.options['foo'] == expected
Exemplo n.º 4
0
def test_time_config_with_type_invalid():
    with pytest.raises(ValueError):
        TimeConfig().with_type('lol')
Exemplo n.º 5
0
def test_time_config_with_type():
    expected = Time.Relative
    config = TimeConfig().with_type(expected)
    assert config.options['type'] == expected.value
Exemplo n.º 6
0
def test_time_config_init():
    assert TimeConfig().options == {}