def test_selecor_without_params():
    assert selector('@a') == '@a'
def test_selector_with_kwargs():
    assert selector('@Arth2000', 'type', r='1', c='-1') in ('@e[name=Arth2000,type={},r=1,c=-1]',
                                                            '@e[name=Arth2000,type={},c=-1,r=1]')
Beispiel #3
0
def test_selecor_without_params():
    assert selector('@a') == '@a'
def test_selector_with_double_smaller_than_scoreboard():
    assert selector('@e[name=Arth2000,-1<=god<=0]') == '@e[name=Arth2000,score_god_min=-1,score_god=0]'
def test_selector_with_greater_than_scoreboard():
    assert selector('@e[name=Arth2000,god>=-1]') == '@e[name=Arth2000,score_god_min=-1]'
def test_selector_without_params_with_custom_selector():
    assert selector('@me') in ('@e[c=1,r=0]', '@e[r=0,c=1]')
def test_selector_with_normal_params():
    assert selector('@e[name=Arth2000,type=Player]') == '@e[name=Arth2000,type=Player]'
Beispiel #8
0
def test_selector_with_equal_scoreboard():
    assert selector('@e[name=Arth2000,god==0]'
                    ) == '@e[name=Arth2000,score_god_min=0,score_god=0]'
Beispiel #9
0
def test_selector_with_double_smaller_than_scoreboard():
    assert selector('@e[name=Arth2000,-1<=god<=0]'
                    ) == '@e[name=Arth2000,score_god_min=-1,score_god=0]'
Beispiel #10
0
def test_selector_without_params_with_name():
    assert selector('@Hero') == '@e[name=Hero]'
Beispiel #11
0
def test_selector_with_normal_params():
    assert selector(
        '@e[name=Arth2000,type=Player]') == '@e[name=Arth2000,type=Player]'
Beispiel #12
0
def test_selector_without_params_with_custom_selector():
    assert selector('@me') in ('@e[c=1,r=0]', '@e[r=0,c=1]')
Beispiel #13
0
def test_selector_without_params_with_negative_type_name():
    assert selector('@!cows') == '@e[type=!Cow]'
Beispiel #14
0
def test_selector_without_params_with_type():
    assert selector('@items') == '@e[type=Item]'
def test_selector_without_params_with_type():
    assert selector('@items') == '@e[type=Item]'
Beispiel #16
0
def test_selector_with_smaller_than_scoreboard():
    assert selector(
        '@e[name=Arth2000,god<=0]') == '@e[name=Arth2000,score_god=0]'
def test_selector_without_params_with_negative_type_name():
    assert selector('@!cows') == '@e[type=!Cow]'
Beispiel #18
0
def test_selector_with_greater_than_scoreboard():
    assert selector(
        '@e[name=Arth2000,god>=-1]') == '@e[name=Arth2000,score_god_min=-1]'
def test_selector_without_params_with_name():
    assert selector('@Hero') == '@e[name=Hero]'
Beispiel #20
0
def test_selector_with_args():
    assert selector('@Arth2000', 'r', 'c') == '@e[name=Arth2000,r={},c={}]'
def test_selector_with_equal_scoreboard():
    assert selector('@e[name=Arth2000,god==0]') == '@e[name=Arth2000,score_god_min=0,score_god=0]'
Beispiel #22
0
def test_selector_with_kwargs():
    assert selector('@Arth2000', 'type', r='1',
                    c='-1') in ('@e[name=Arth2000,type={},r=1,c=-1]',
                                '@e[name=Arth2000,type={},c=-1,r=1]')
def test_selector_with_smaller_than_scoreboard():
    assert selector('@e[name=Arth2000,god<=0]') == '@e[name=Arth2000,score_god=0]'
Beispiel #24
0
def test_selector_with_everything():
    assert selector('@!a[name=Arth2000,1>=god>=0,death<=7,t>=1]', 'c', r='1000') == \
           '@e[type=!Player,name=Arth2000,score_god_min=0,score_god=1,score_death=7,score_t_min=1,c={},r=1000]'
def test_selector_with_args():
    assert selector('@Arth2000', 'r', 'c') == '@e[name=Arth2000,r={},c={}]'
def test_selector_name():
    assert selector('Arth2000') == 'Arth2000'
def test_selector_with_everything():
    assert selector('@!a[name=Arth2000,1>=god>=0,death<=7,t>=1]', 'c', r='1000') == \
           '@e[type=!Player,name=Arth2000,score_god_min=0,score_god=1,score_death=7,score_t_min=1,c={},r=1000]'
Beispiel #28
0
def test_selector_name():
    assert selector('Arth2000') == 'Arth2000'