Пример #1
0
def _check_table_markup(s):
    toks = [t[0] for t in mwscan.scan(s)]
    print "TOKENS:", toks
    assert mwscan.token.t_begin_table not in toks, "should not contain table markup"
    assert mwscan.token.t_end_table not in toks, "should not contain table markup"
Пример #2
0
def _check_table_markup(s):
    toks = [t[0] for t in mwscan.scan(s)]
    print "TOKENS:", toks
    assert mwscan.token.t_begin_table not in toks, "should not contain table markup"
    assert mwscan.token.t_end_table not in toks, "should not contain table markup"
Пример #3
0
def test_url():
    s = mwscan.scan(
        "http://tools.wikimedia.de/~magnus/geo/geohack.php?language=de&params=50_0_0_N_8_16_16_E_type:city(190934)_region:DE-RP")
    print s
    assert len(s) == 1, "expected one url"
Пример #4
0
def test_url():
    s = mwscan.scan(
        "http://tools.wikimedia.de/~magnus/geo/geohack.php?language=de&params=50_0_0_N_8_16_16_E_type:city(190934)_region:DE-RP"
    )
    print s
    assert len(s) == 1, "expected one url"