예제 #1
0
def test_selecor_without_params():
    assert selector('@a') == '@a'
예제 #2
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]')
예제 #3
0
def test_selecor_without_params():
    assert selector('@a') == '@a'
예제 #4
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]'
예제 #5
0
def test_selector_with_greater_than_scoreboard():
    assert selector('@e[name=Arth2000,god>=-1]') == '@e[name=Arth2000,score_god_min=-1]'
예제 #6
0
def test_selector_without_params_with_custom_selector():
    assert selector('@me') in ('@e[c=1,r=0]', '@e[r=0,c=1]')
예제 #7
0
def test_selector_with_normal_params():
    assert selector('@e[name=Arth2000,type=Player]') == '@e[name=Arth2000,type=Player]'
예제 #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]'
예제 #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]'
예제 #10
0
def test_selector_without_params_with_name():
    assert selector('@Hero') == '@e[name=Hero]'
예제 #11
0
def test_selector_with_normal_params():
    assert selector(
        '@e[name=Arth2000,type=Player]') == '@e[name=Arth2000,type=Player]'
예제 #12
0
def test_selector_without_params_with_custom_selector():
    assert selector('@me') in ('@e[c=1,r=0]', '@e[r=0,c=1]')
예제 #13
0
def test_selector_without_params_with_negative_type_name():
    assert selector('@!cows') == '@e[type=!Cow]'
예제 #14
0
def test_selector_without_params_with_type():
    assert selector('@items') == '@e[type=Item]'
예제 #15
0
def test_selector_without_params_with_type():
    assert selector('@items') == '@e[type=Item]'
예제 #16
0
def test_selector_with_smaller_than_scoreboard():
    assert selector(
        '@e[name=Arth2000,god<=0]') == '@e[name=Arth2000,score_god=0]'
예제 #17
0
def test_selector_without_params_with_negative_type_name():
    assert selector('@!cows') == '@e[type=!Cow]'
예제 #18
0
def test_selector_with_greater_than_scoreboard():
    assert selector(
        '@e[name=Arth2000,god>=-1]') == '@e[name=Arth2000,score_god_min=-1]'
예제 #19
0
def test_selector_without_params_with_name():
    assert selector('@Hero') == '@e[name=Hero]'
예제 #20
0
def test_selector_with_args():
    assert selector('@Arth2000', 'r', 'c') == '@e[name=Arth2000,r={},c={}]'
예제 #21
0
def test_selector_with_equal_scoreboard():
    assert selector('@e[name=Arth2000,god==0]') == '@e[name=Arth2000,score_god_min=0,score_god=0]'
예제 #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]')
예제 #23
0
def test_selector_with_smaller_than_scoreboard():
    assert selector('@e[name=Arth2000,god<=0]') == '@e[name=Arth2000,score_god=0]'
예제 #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]'
예제 #25
0
def test_selector_with_args():
    assert selector('@Arth2000', 'r', 'c') == '@e[name=Arth2000,r={},c={}]'
예제 #26
0
def test_selector_name():
    assert selector('Arth2000') == 'Arth2000'
예제 #27
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]'
예제 #28
0
def test_selector_name():
    assert selector('Arth2000') == 'Arth2000'