コード例 #1
0
    def test_dj(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multilingual(None)

        class _config:
            options = {"language": ["fr", "ar"], "multilingual-style": "dj"}

        class father:
            config = _config()

        self.p.father = father()
        self.p.init(None)

        e = self.p.node(
            None, {
                "name": u"Avenue 17 / جادة 17",
                "name:fr": u"Avenue",
                "name:ar": u"جادة"
            })
        self.check_err(e)

        assert not self.p.way(None, {
            "name": u"Avenue جادة",
            "name:fr": u"Avenue",
            "name:ar": u"جادة"
        }, None)
        assert not self.p.way(
            None, {
                "name": u"Avenue 17 / جادة 17",
                "name:fr": u"Avenue 17",
                "name:ar": u"جادة 17"
            }, None)
コード例 #2
0
    def test_ma(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multilingual(None)

        class _config:
            options = {"language": ["fr", "ar"], "multilingual-style": "ma"}

        class father:
            config = _config()

        self.p.father = father()
        self.p.init(None)

        e = self.p.node(None, {"name": u"Troch", "name:fr": u"Kasbat Troch", "name:ar": u"قصبة الطرش"})
        assert 50604 == e[0][0]
        self.check_err(e)

        e = self.p.node(None, {"name": u"Kasbat Troch قصبة الطرش"})
        assert 50605 == e[0][0]
        self.check_err(e)

        e = self.p.node(None, {"name:fr": u"Kasbat Troch", "name:ar": u"قصبة الطرش"})
        assert 50606 == e[0][0]
        self.check_err(e)

        assert not self.p.way(
            None, {"name": u"Kasbat Troch قصبة الطرش", "name:fr": u"Kasbat Troch", "name:ar": u"قصبة الطرش"}, None
        )
        assert not self.p.way(None, {"name": u"Kasbat Troch"}, None)
コード例 #3
0
    def test(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Punctuation(None)
        self.p.init(None)

        assert not self.p.node(None, {"foo": u"bar"})
        assert self.p.node(None, {"name": u"here ?"})
コード例 #4
0
    def test_be(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multilingual(None)

        class _config:
            options = {"language": ["fr", "nl"], "multilingual-style": "be"}

        class father:
            config = _config()

        self.p.father = father()
        self.p.init(None)

        e = self.p.node(None, {"name": u"a - b", "name:fr": u"fr", "name:nl": u"nl"})
        assert 50604 == e[0][0]
        self.check_err(e)

        e = self.p.node(None, {"name": u"fr - nl"})
        assert 50605 == e[0][0]
        self.check_err(e)

        e = self.p.node(None, {"name:fr": u"fr", "name:nl": u"nl"})
        assert 50606 == e[0][0]
        self.check_err(e)

        assert not self.p.way(None, {"name": u"fr - nl", "name:fr": u"fr", "name:nl": u"nl"}, None)
        assert not self.p.way(None, {"name": u"nl - fr", "name:fr": u"fr", "name:nl": u"nl"}, None)
        assert not self.p.way(None, {"name": u"foo", "name:fr": u"foo", "name:nl": u"foo"}, None)
コード例 #5
0
    def test(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Punctuation(None)
        self.p.init(None)

        assert not self.p.node(None, {"foo": u"bar"})
        assert self.p.node(None, {"name": u"here ?"})
コード例 #6
0
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.analyser = TagFix_Wikipedia(None)
     class _config:
         options = {"language": "fr"}
     class father:
         config = _config()
     self.analyser.father = father()
     self.analyser.init(None)
コード例 #7
0
 def test(self):
     TestPluginCommon.setUp(self)
     self.p = Name_Multilingual(None)
     class _config:
         options = {}
     class father:
         config = _config()
     self.p.father = father()
     assert self.p.init(None) is False
コード例 #8
0
 def test(self):
     TestPluginCommon.setUp(self)
     self.p = Name_Multilingual(None)
     class _config:
         options = {}
     class father:
         config = _config()
     self.p.father = father()
     assert False == self.p.init(None)
コード例 #9
0
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.analyser = TagFix_Wikipedia(None)
     class _config:
         options = {"language": "fr", "project": "openstreetmap"}
     class father:
         config = _config()
     self.analyser.father = father()
     self.analyser.init(None)
コード例 #10
0
    def test(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Quotation(None)
        self.p.init(None)

        assert not self.p.node(None, {"foo": u"bar"})
        assert self.p.node(None, {"name": u"("})
        assert self.p.node(None, {"name": u"(]"})
        assert self.p.node(None, {"name": u"(("})
        assert not self.p.node(None, {"name": u"{[]}"})
        assert self.p.node(None, {"name": u"{[}]"})
コード例 #11
0
    def test(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Quotation(None)
        self.p.init(None)

        assert not self.p.node(None, {"foo": u"bar"})
        assert self.p.node(None, {"name": u"("})
        assert self.p.node(None, {"name": u"(]"})
        assert self.p.node(None, {"name": u"(("})
        assert not self.p.node(None, {"name": u"{[]}"})
        assert self.p.node(None, {"name": u"{[}]"})
コード例 #12
0
    def test_us(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multiple(None)
        class _config:
            options = {"country": "US"}
        class father:
            config = _config()
        self.p.father = father()
        self.p.init(None)

        assert not self.p.way(None, {"name": u"County Route 7/2"}, None)
        assert not self.p.way(None, {"name": u"16 5/10 Road"}, None)
コード例 #13
0
    def setUp(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multiple(None)

        class _config:
            options = {"country": "TH"}

        class father:
            config = _config()

        self.p.father = father()
        self.p.init(None)
コード例 #14
0
    def test(self):
        TestPluginCommon.setUp(self)
        p = Name_Multiple(None)

        class _config:
            options = {"country": None}

        class father:
            config = _config()

        p.father = father()

        with with_options(p, {'country': 'TH'}):
            p.init(None)
            self.check_err(p.way(None, {"name": "aueuie ; ueuaeuie"}, None))
            self.check_err(p.way(None, {"name": "aueuie / ueuaeuie"}, None))
            self.check_err(p.way(None, {"name": "aueuie + ueuaeuie"}, None))
            assert not p.way(None, {"amenity": "aueuie + ueuaeuie"}, None)
            assert not p.way(None, {
                "name": "aueuie + ueuaeuie",
                "aeroway": "yes"
            }, None)
            assert not p.way(None, {"name": "Profil+"}, None)
            assert not p.way(None, {"name": u"บ้านแพะแม่คือ ซอย 5/10"}, None)
            assert not p.way(None, {"name": u"บ้านแพะแม่คือ ซอย 5/๓๔๕"}, None)
            assert not p.way(None, {
                "name": "streetA/streetB",
                "public_transport": "platform"
            }, None)

        with with_options(p, {'country': 'US-TX'}):
            p.init(None)
            assert not p.way(None, {"name": u"County Route 7/2"}, None)
            assert not p.way(None, {"name": u"16 5/10 Road"}, None)

        with with_options(p, {'country': 'BY'}):
            p.init(None)
            assert not p.way(None, {"name": u"д/с №68"}, None)
            assert p.way(None, {
                "name": u"д/с №68",
                "highway": "terciary"
            }, None)

        with with_options(p, {'country': 'CH'}):
            p.init(None)
            assert not p.way(None, {"name": u"Waffenplatz-/Bederstrasse"},
                             None)

        with with_options(p, {'country': 'DJ'}):
            p.init(None)
            assert not p.way(None, {"name": u"Avenue 17 / جادة 17"}, None)

        assert not p.way(None, {"name": u"Gas station no. 21/2356"}, None)
コード例 #15
0
ファイル: Name_Multiple.py プロジェクト: Olyon/osmose-backend
    def test(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multiple(None)
        class _config:
            options = {"country": "US"}
        class father:
            config = _config()
        self.p.father = father()
        self.p.init(None)

        assert not self.p.way(None, {"name": u"County Route 7/2"}, None)
        assert not self.p.way(None, {"name": u"16 5/10 Road"}, None)
コード例 #16
0
    def test(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Quotation(None)
        self.p.init(None)

        assert not self.p.node(None, {"foo": "bar"})
        assert self.p.node(None, {"name": "("})
        assert self.p.node(None, {"name": "(]"})
        assert self.p.node(None, {"name": "(("})
        assert not self.p.node(None, {"name": "{[]}"})
        assert self.p.node(None, {"name": "{[}]"})
        assert not self.p.node(None, {"name": "קריית מוצקין (תפעולית)"})
        assert self.p.node(None, {"name": "קריית מוצקין (תפעולית"})
        assert self.p.node(None, {"name": "120 - (ביס אסיף (התפתחות הילד "}) # Twice '(' but not writer in the same direction
コード例 #17
0
    def test_dj(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multilingual(None)
        class _config:
            options = {"language": ["fr", "ar"], "multilingual-style": "dj"}
        class father:
            config = _config()
        self.p.father = father()
        self.p.init(None)

        e = self.p.node(None, {"name": u"Avenue 17 / جادة 17", "name:fr": u"Avenue", "name:ar": u"جادة"})
        self.check_err(e)

        assert not self.p.way(None, {"name": u"Avenue جادة", "name:fr": u"Avenue", "name:ar": u"جادة"}, None)
        assert not self.p.way(None, {"name": u"Avenue 17 / جادة 17", "name:fr": u"Avenue 17", "name:ar": u"جادة 17"}, None)
コード例 #18
0
    def test_be(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multilingual(None)
        class _config:
            options = {"language": ["fr", "nl"], "multilingual-style": "be"}
        class father:
            config = _config()
        self.p.father = father()
        self.p.init(None)

        assert not self.p.node(None, {"foo": u"bar"})

        e = self.p.node(None, {"name": u"a - b", "name:fr": u"fr", "name:nl": u"nl"})
        assert 4 == len(e[0]["fix"])
        self.check_err(e)

        e = self.p.node(None, {"name": u"fr - nl"})
        self.check_err(e)

        e = self.p.node(None, {"name:fr": u"fr", "name:nl": u"nl"})
        self.check_err(e)

        assert not self.p.way(None, {"name": u"fr - nl", "name:fr": u"fr", "name:nl": u"nl"}, None)
        assert not self.p.way(None, {"name": u"nl - fr", "name:fr": u"fr", "name:nl": u"nl"}, None)
        assert not self.p.way(None, {"name": u"foo", "name:fr": u"foo", "name:nl": u"foo"}, None)

        e = self.p.node(None, {"name": u"fr", "name:nl": u"nl"})
        assert 5 == len(e[0]["fix"])
        self.check_err(e)

        e = self.p.node(None, {"name:fr": u"fr", "name": u"nl"})
        assert 5 == len(e[0]["fix"])
        self.check_err(e)

        e = self.p.node(None, {"name": u"Kruidtuin", "name:nl": u"Kruidtuin", "name:fr": u"Botanique"})
        assert 2 == len(e[0]["fix"])

        e = self.p.split_be(u"(œ)")
        assert 1 == len(e)

        e = self.p.split_be(u"(í)")
        assert 1 == len(e)

        e = self.p.split_be(u"(œ) - (í)")
        assert 1 == len(e)
コード例 #19
0
    def test_be(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multilingual(None)
        class _config:
            options = {"language": ["fr", "nl"], "multilingual_style": "be"}
        class father:
            config = _config()
        self.p.father = father()
        self.p.init(None)

        assert not self.p.node(None, {"foo": u"bar"})

        e = self.p.node(None, {"name": u"a - b", "name:fr": u"fr", "name:nl": u"nl"})
        assert 4 == len(e[0]["fix"])
        self.check_err(e)

        e = self.p.node(None, {"name": u"fr - nl"})
        self.check_err(e)

        e = self.p.node(None, {"name:fr": u"fr", "name:nl": u"nl"})
        self.check_err(e)

        assert not self.p.way(None, {"name": u"fr - nl", "name:fr": u"fr", "name:nl": u"nl"}, None)
        assert not self.p.way(None, {"name": u"nl - fr", "name:fr": u"fr", "name:nl": u"nl"}, None)
        assert not self.p.way(None, {"name": u"foo", "name:fr": u"foo", "name:nl": u"foo"}, None)

        e = self.p.node(None, {"name": u"fr", "name:nl": u"nl"})
        assert 5 == len(e[0]["fix"])
        self.check_err(e)

        e = self.p.node(None, {"name:fr": u"fr", "name": u"nl"})
        assert 5 == len(e[0]["fix"])
        self.check_err(e)

        e = self.p.node(None, {"name": u"Kruidtuin", "name:nl": u"Kruidtuin", "name:fr": u"Botanique"})
        assert 2 == len(e[0]["fix"])

        e = self.p.split_be(u"(œ)")
        assert 1 == len(e)

        e = self.p.split_be(u"(í)")
        assert 1 == len(e)

        e = self.p.split_be(u"(œ) - (í)")
        assert 1 == len(e)
コード例 #20
0
    def test_by(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multiple(None)

        class _config:
            options = {"country": "BY"}

        class father:
            config = _config()

        self.p.father = father()
        self.p.init(None)

        assert not self.p.way(None, {"name": u"д/с №68"}, None)
        assert self.p.way(None, {
            "name": u"д/с №68",
            "highway": "terciary"
        }, None)
コード例 #21
0
    def test_th(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multiple(None)
        class _config:
            options = {"country": "TH"}
        class father:
            config = _config()
        self.p.father = father()
        self.p.init(None)

        self.check_err(self.p.way(None, {"name": "aueuie ; ueuaeuie"}, None))
        self.check_err(self.p.way(None, {"name": "aueuie / ueuaeuie"}, None))
        self.check_err(self.p.way(None, {"name": "aueuie + ueuaeuie"}, None))
        assert not self.p.way(None, {"amenity": "aueuie + ueuaeuie"}, None)
        assert not self.p.way(None, {"name": "aueuie + ueuaeuie", "aeroway": "yes"}, None)
        assert not self.p.way(None, {"name": "Profil+"}, None)
        assert not self.p.way(None, {"name": u"บ้านแพะแม่คือ ซอย 5/10"}, None)
        assert not self.p.way(None, {"name": u"บ้านแพะแม่คือ ซอย 5/๓๔๕"}, None)
コード例 #22
0
ファイル: Name_Multiple.py プロジェクト: Olyon/osmose-backend
    def test(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multiple(None)
        class _config:
            options = {"country": "TH"}
        class father:
            config = _config()
        self.p.father = father()
        self.p.init(None)

        self.check_err(self.p.way(None, {"name": "aueuie ; ueuaeuie"}, None))
        self.check_err(self.p.way(None, {"name": "aueuie / ueuaeuie"}, None))
        self.check_err(self.p.way(None, {"name": "aueuie + ueuaeuie"}, None))
        assert not self.p.way(None, {"amenity": "aueuie + ueuaeuie"}, None)
        assert not self.p.way(None, {"name": "aueuie + ueuaeuie", "aeroway": "yes"}, None)
        assert not self.p.way(None, {"name": "Profil+"}, None)
        assert not self.p.way(None, {"name": u"บ้านแพะแม่คือ ซอย 5/10"}, None)
        assert not self.p.way(None, {"name": u"บ้านแพะแม่คือ ซอย 5/๓๔๕"}, None)
コード例 #23
0
    def test_be(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multilingual(None)

        class _config:
            options = {"language": ["fr", "nl"], "multilingual-style": "be"}

        class father:
            config = _config()

        self.p.father = father()
        self.p.init(None)

        e = self.p.node(None, {
            "name": u"a - b",
            "name:fr": u"fr",
            "name:nl": u"nl"
        })
        assert 50604 == e[0]["class"]
        self.check_err(e)

        e = self.p.node(None, {"name": u"fr - nl"})
        assert 50605 == e[0]["class"]
        self.check_err(e)

        e = self.p.node(None, {"name:fr": u"fr", "name:nl": u"nl"})
        assert 50606 == e[0]["class"]
        self.check_err(e)

        assert not self.p.way(None, {
            "name": u"fr - nl",
            "name:fr": u"fr",
            "name:nl": u"nl"
        }, None)
        assert not self.p.way(None, {
            "name": u"nl - fr",
            "name:fr": u"fr",
            "name:nl": u"nl"
        }, None)
        assert not self.p.way(None, {
            "name": u"foo",
            "name:fr": u"foo",
            "name:nl": u"foo"
        }, None)
コード例 #24
0
    def test_ma(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multilingual(None)
        class _config:
            options = {"language": ["fr", "ar", "zgh", "ber"], "multilingual-style": "ma"}
        class father:
            config = _config()
        self.p.father = father()
        self.p.init(None)

        e = self.p.node(None, {"name": u"Troch", "name:fr": u"Kasbat Troch", "name:ar": u"قصبة الطرش"})
        self.check_err(e)

        e = self.p.node(None, {"name": u"Kasbat Troch قصبة الطرش"})
        self.check_err(e)

        e = self.p.node(None, {"name:fr": u"Kasbat Troch", "name:ar": u"قصبة الطرش"})
        self.check_err(e)

        assert not self.p.way(None, {"name": u"Kasbat Troch قصبة الطرش", "name:fr": u"Kasbat Troch", "name:ar": u"قصبة الطرش"}, None)
        assert not self.p.way(None, {"name": u"Kasbat Troch"}, None)

        e = self.p.node(None, {"name": u"Derb Al Bire", "name:ar": u"درب البير"})
        self.check_err(e)

        r = self.p.split_ma(u"Tizi n'Tichka ⵜⵉⵣⵉ ⵏ ⵜⵉⵛⴽⴰ تيزي ن تيشكا")
        assert u"Tizi n'Tichka" == r[0]["name:fr"]
        assert u"ⵜⵉⵣⵉ ⵏ ⵜⵉⵛⴽⴰ" == r[0]["name:zgh"]
        assert u"تيزي ن تيشكا" == r[0]["name:ar"]

        r = self.p.split_ma(u"Bab Atlas ⴱⴰⴱ ⴰⵟⵍⴰⵙ")
        assert u"Bab Atlas" == r[0]["name:fr"]
        assert u"ⴱⴰⴱ ⴰⵟⵍⴰⵙ" == r[0]["name:zgh"]
        assert None == r[0].get("name:ar")

        r = self.p.split_ma(u"Avenue Mohammed V 2 (Beau Gosse) شارع محمد الخامس 2")
        assert u"Avenue Mohammed V 2 (Beau Gosse)" == r[0]["name:fr"]
        assert u"شارع محمد الخامس 2" == r[0]["name:ar"]

        assert not self.p.node(None, {"name": u"Bab Atlas ⴱⴰⴱ ⴰⵟⵍⴰⵙ", "name:fr": u"Bab Atlas", "name:zgh": u"ⴱⴰⴱ ⴰⵟⵍⴰⵙ"})
        assert self.p.node(None, {"name": u"Bab Atlas ⴱⴰⴱ ⴰⵟⵍⴰⵙ", "name:fr": u"Bab PAS Atlas", "name:zgh": u"ⴱⴰⴱ ⴰⵟⵍⴰⵙ"})

        assert not self.p.node(None, {"name": u"Agdal ⴰⴳⴷⴰⵍ أگدال", "name:ar": u"أگدال", "name:zgh": u"ⴰⴳⴷⴰⵍ", "name:fr": u"Agdal "})
コード例 #25
0
    def test_ma(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multilingual(None)
        class _config:
            options = {"language": ["fr", "ar", "zgh", "ber"], "multilingual_style": "ma"}
        class father:
            config = _config()
        self.p.father = father()
        self.p.init(None)

        e = self.p.node(None, {"name": u"Troch", "name:fr": u"Kasbat Troch", "name:ar": u"قصبة الطرش"})
        self.check_err(e)

        e = self.p.node(None, {"name": u"Kasbat Troch قصبة الطرش"})
        self.check_err(e)

        e = self.p.node(None, {"name:fr": u"Kasbat Troch", "name:ar": u"قصبة الطرش"})
        self.check_err(e)

        assert not self.p.way(None, {"name": u"Kasbat Troch قصبة الطرش", "name:fr": u"Kasbat Troch", "name:ar": u"قصبة الطرش"}, None)
        assert not self.p.way(None, {"name": u"Kasbat Troch"}, None)

        e = self.p.node(None, {"name": u"Derb Al Bire", "name:ar": u"درب البير"})
        self.check_err(e)

        r = self.p.split_ma(u"Tizi n'Tichka ⵜⵉⵣⵉ ⵏ ⵜⵉⵛⴽⴰ تيزي ن تيشكا")
        assert u"Tizi n'Tichka" == r[0]["name:fr"]
        assert u"ⵜⵉⵣⵉ ⵏ ⵜⵉⵛⴽⴰ" == r[0]["name:zgh"]
        assert u"تيزي ن تيشكا" == r[0]["name:ar"]

        r = self.p.split_ma(u"Bab Atlas ⴱⴰⴱ ⴰⵟⵍⴰⵙ")
        assert u"Bab Atlas" == r[0]["name:fr"]
        assert u"ⴱⴰⴱ ⴰⵟⵍⴰⵙ" == r[0]["name:zgh"]
        assert r[0].get("name:ar") is None

        r = self.p.split_ma(u"Avenue Mohammed V 2 (Beau Gosse) شارع محمد الخامس 2")
        assert u"Avenue Mohammed V 2 (Beau Gosse)" == r[0]["name:fr"]
        assert u"شارع محمد الخامس 2" == r[0]["name:ar"]

        assert not self.p.node(None, {"name": u"Bab Atlas ⴱⴰⴱ ⴰⵟⵍⴰⵙ", "name:fr": u"Bab Atlas", "name:zgh": u"ⴱⴰⴱ ⴰⵟⵍⴰⵙ"})
        assert self.p.node(None, {"name": u"Bab Atlas ⴱⴰⴱ ⴰⵟⵍⴰⵙ", "name:fr": u"Bab PAS Atlas", "name:zgh": u"ⴱⴰⴱ ⴰⵟⵍⴰⵙ"})

        assert not self.p.node(None, {"name": u"Agdal ⴰⴳⴷⴰⵍ أگدال", "name:ar": u"أگدال", "name:zgh": u"ⴰⴳⴷⴰⵍ", "name:fr": u"Agdal "})
コード例 #26
0
    def test_ma(self):
        TestPluginCommon.setUp(self)
        self.p = Name_Multilingual(None)

        class _config:
            options = {"language": ["fr", "ar"], "multilingual-style": "ma"}

        class father:
            config = _config()

        self.p.father = father()
        self.p.init(None)

        e = self.p.node(None, {
            "name": u"Troch",
            "name:fr": u"Kasbat Troch",
            "name:ar": u"قصبة الطرش"
        })
        assert 50604 == e[0]["class"]
        self.check_err(e)

        e = self.p.node(None, {"name": u"Kasbat Troch قصبة الطرش"})
        assert 50605 == e[0]["class"]
        self.check_err(e)

        e = self.p.node(None, {
            "name:fr": u"Kasbat Troch",
            "name:ar": u"قصبة الطرش"
        })
        assert 50606 == e[0]["class"]
        self.check_err(e)

        assert not self.p.way(
            None, {
                "name": u"Kasbat Troch قصبة الطرش",
                "name:fr": u"Kasbat Troch",
                "name:ar": u"قصبة الطرش"
            }, None)
        assert not self.p.way(None, {"name": u"Kasbat Troch"}, None)
コード例 #27
0
    def test(self):
        TestPluginCommon.setUp(self)
        p = Name_Multiple(None)
        class _config:
            options = {"country": None}
        class father:
            config = _config()
        p.father = father()

        with with_options(p, {'country': 'TH'}):
            p.init(None)
            self.check_err(p.way(None, {"name": "aueuie ; ueuaeuie"}, None))
            self.check_err(p.way(None, {"name": "aueuie / ueuaeuie"}, None))
            self.check_err(p.way(None, {"name": "aueuie + ueuaeuie"}, None))
            assert not p.way(None, {"amenity": "aueuie + ueuaeuie"}, None)
            assert not p.way(None, {"name": "aueuie + ueuaeuie", "aeroway": "yes"}, None)
            assert not p.way(None, {"name": "Profil+"}, None)
            assert not p.way(None, {"name": u"บ้านแพะแม่คือ ซอย 5/10"}, None)
            assert not p.way(None, {"name": u"บ้านแพะแม่คือ ซอย 5/๓๔๕"}, None)

        with with_options(p, {'country': 'US-TX'}):
            p.init(None)
            assert not p.way(None, {"name": u"County Route 7/2"}, None)
            assert not p.way(None, {"name": u"16 5/10 Road"}, None)

        with with_options(p, {'country': 'BY'}):
            p.init(None)
            assert not p.way(None, {"name": u"д/с №68"}, None)
            assert p.way(None, {"name": u"д/с №68", "highway": "terciary"}, None)

        with with_options(p, {'country': 'CH'}):
            p.init(None)
            assert not p.way(None, {"name": u"Waffenplatz-/Bederstrasse"}, None)

        with with_options(p, {'country': 'DJ'}):
            p.init(None)
            assert not p.way(None, {"name": u"Avenue 17 / جادة 17"}, None)
コード例 #28
0
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = Name_Initials(None)
     self.p.init(None)
コード例 #29
0
ファイル: Name_Saint.py プロジェクト: naoliv/osmose-backend
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = Name_Saint(None)
     self.p.init(None)
コード例 #30
0
ファイル: Construction.py プロジェクト: Olyon/osmose-backend
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = Construction(None)
     self.p.init(None)
コード例 #31
0
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = Name_Saint_FR(None)
     self.p.init(None)
コード例 #32
0
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = Structural_Useless_Relation(None)
     self.p.init(None)
コード例 #33
0
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = Administrative_TooManyWays(None)
     self.p.init(None)
コード例 #34
0
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = Name_Multiple(None)
     self.p.init(None)
コード例 #35
0
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = Name_Initials(None)
     self.p.init(None)
コード例 #36
0
ファイル: TagFix_Note.py プロジェクト: naoliv/osmose-backend
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = TagFix_Note(None)
     self.p.init(None)
コード例 #37
0
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = Structural_Useless_Relation(None)
     self.p.init(None)
コード例 #38
0
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = Administrative_TooManyWays(None)
     self.p.init(None)
コード例 #39
0
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = Addr_Interpolation(None)
     self.set_default_config(self.p)
     self.p.init(None)
コード例 #40
0
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = Addr_Interpolation(None)
     self.set_default_config(self.p)
     self.p.init(None)
コード例 #41
0
ファイル: Construction.py プロジェクト: wetneb/osmose-backend
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = Construction(None)
     self.set_default_config(self.p)
     self.p.init(None)
コード例 #42
0
ファイル: Construction.py プロジェクト: osm-fr/osmose-backend
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = Construction(None)
     self.set_default_config(self.p)
     self.p.init(None)
コード例 #43
0
 def setUp(self):
     TestPluginCommon.setUp(self)
     self.p = TagFix_Note_Lang_fr(None)
     self.p.init(None)