Esempio n. 1
0
def test_not():
    not_true = not_(true)
    check_feature(not_true, False)

    not_true = true.not_()
    check_feature(not_true, False)
Esempio n. 2
0
    properties.OFFICIAL_WEBSITE,
    name=name + '.official_website_changed')
en_label_changed = bools.item_in_set(
    'en', diff.datasources.labels_changed,
    name=name + '.en_label_changed')


# Status
revision = wikibase_features.revision
is_human = revision.has_property_value(properties.INSTANCE_OF, items.HUMAN,
                                       name=name + '.is_human')
has_birthday = revision.has_property(properties.DATE_OF_BIRTH,
                                     name='revision.has_birthday')
dead = revision.has_property(properties.DATE_OF_DEATH,
                             name='revision.dead')
is_blp = has_birthday.and_(not_(dead))

local_wiki = [
    is_client_move,
    is_client_delete,
    is_merge_into,
    is_merge_from,
    is_revert,
    is_restore,
    is_item_creation,
    sex_or_gender_changed,
    country_of_citizenship_changed,
    member_of_sports_team_changed,
    date_of_birth_changed,
    image_changed,
    signature_changed,
Esempio n. 3
0
def test_or():
    true_or_true = true.or_(true)
    check_feature(true_or_true, True)

    true_or_not_true = true.or_(not_(true))
    check_feature(true_or_not_true, True)
Esempio n. 4
0
def test_and():
    true_and_true = true.and_(true)
    check_feature(true_and_true, True)

    true_and_not_true = true.and_(not_(true))
    check_feature(true_and_not_true, False)
Esempio n. 5
0
def test_not():
    not_true = not_(true)
    check_feature(not_true, False)

    not_true = true.not_()
    check_feature(not_true, False)
Esempio n. 6
0
def test_or():
    true_or_true = true.or_(true)
    check_feature(true_or_true, True)

    true_or_not_true = true.or_(not_(true))
    check_feature(true_or_not_true, True)
Esempio n. 7
0
def test_and():
    true_and_true = true.and_(true)
    check_feature(true_and_true, True)

    true_and_not_true = true.and_(not_(true))
    check_feature(true_and_not_true, False)