コード例 #1
0
ファイル: test_glib.py プロジェクト: onia/pygobject
    def test_uri_extract(self):
        res = GLib.uri_list_extract_uris('''# some comment
http://example.com
https://my.org/q?x=1&y=2
            http://gnome.org/new''')
        self.assertEqual(res, ['http://example.com',
                               'https://my.org/q?x=1&y=2',
                               'http://gnome.org/new'])
コード例 #2
0
ファイル: test_glib.py プロジェクト: schlueter/pygobject
    def test_uri_extract(self):
        res = GLib.uri_list_extract_uris('''# some comment
http://example.com
https://my.org/q?x=1&y=2
            http://gnome.org/new''')
        self.assertEqual(res, ['http://example.com',
                               'https://my.org/q?x=1&y=2',
                               'http://gnome.org/new'])
コード例 #3
0
ファイル: test_glib.py プロジェクト: anthrotype/pygobject
    def test_uri_extract(self):
        res = GLib.uri_list_extract_uris(
            """# some comment
http://example.com
https://my.org/q?x=1&y=2
            http://gnome.org/new"""
        )
        self.assertEqual(res, ["http://example.com", "https://my.org/q?x=1&y=2", "http://gnome.org/new"])
コード例 #4
0
ファイル: test_uris.py プロジェクト: dieterv/pygobject
 def testExtractUris(self):
     uri_list_text = "# urn:isbn:0-201-08372-8\n" + \
                     "http://www.huh.org/books/foo.html\n" + \
                     "http://www.huh.org/books/foo.pdf\n" + \
                     "ftp://ftp.foo.org/books/foo.txt\n"
     uri_list = GLib.uri_list_extract_uris(uri_list_text)
     assert uri_list[0] == "http://www.huh.org/books/foo.html"
     assert uri_list[1] == "http://www.huh.org/books/foo.pdf"
     assert uri_list[2] == "ftp://ftp.foo.org/books/foo.txt"
コード例 #5
0
ファイル: test_uris.py プロジェクト: yucefsourani/pygobject
    def testExtractUris(self):
        uri_list_text = """# urn:isbn:0-201-08372-8
http://www.huh.org/books/foo.html
http://www.huh.org/books/foo.pdf
ftp://ftp.foo.org/books/foo.txt
"""
        uri_list = GLib.uri_list_extract_uris(uri_list_text)
        assert uri_list[0] == "http://www.huh.org/books/foo.html"
        assert uri_list[1] == "http://www.huh.org/books/foo.pdf"
        assert uri_list[2] == "ftp://ftp.foo.org/books/foo.txt"
コード例 #6
0
def split_uri_list(uri_list):
    return GLib.uri_list_extract_uris(uri_list)
コード例 #7
0
ファイル: mime.py プロジェクト: leonardcj/sugar-toolkit-gtk3
def split_uri_list(uri_list):
    return GLib.uri_list_extract_uris(uri_list)