{"action":"opened","issue":{"url":"https://api.github.com/repos/deeplook/svglib/issues/86","repository_url":"https://api.github.com/repos/deeplook/svglib","labels_url":"https://api.github.com/repos/deeplook/svglib/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/deeplook/svglib/issues/86/comments","events_url":"https://api.github.com/repos/deeplook/svglib/issues/86/events","html_url":"https://github.com/deeplook/svglib/issues/86","id":231615717,"number":86,"title":"CI setup","user":{"login":"nicoddemus","id":1085180,"avatar_url":"https://avatars1.githubusercontent.com/u/1085180?v=3","gravatar_id":"","url":"https://api.github.com/users/nicoddemus","html_url":"https://github.com/nicoddemus","followers_url":"https://api.github.com/users/nicoddemus/followers","following_url":"https://api.github.com/users/nicoddemus/following{/other_user}","gists_url":"https://api.github.com/users/nicoddemus/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoddemus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoddemus/subscriptions","organizations_url":"https://api.github.com/users/nicoddemus/orgs","repos_url":"https://api.github.com/users/nicoddemus/repos","events_url":"https://api.github.com/users/nicoddemus/events{/privacy}","received_events_url":"https://api.github.com/users/nicoddemus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-26T12:40:15Z","updated_at":"2017-05-26T12:40:15Z","closed_at":null,"body":"Hi,\r\n\r\nFirst for all thanks for all your work on this package!\r\n\r\nI'm building a conda version of this package for [conda-forge](https://github.com/conda-forge) and it seems to work fine except for two failing tests:\r\n\r\n\r\n```\r\npytest tests -k \"not TestWikipediaFlags.test_convert_pdf\"\r\n============================= test session starts =============================\r\nplatform win32 -- Python 3.5.3, pytest-3.1.0, py-1.4.33, pluggy-0.4.0\r\nrootdir: e:\\Miniconda3\\conda-bld\\svglib_1495798629498\\test_tmp, inifile:\r\ncollected 36 items\r\n\r\ntests\\test_basic.py ............................\r\ntests\\test_samples.py .s.sEsEs\r\n\r\n=================================== ERRORS ====================================\r\n____________ ERROR at setup of TestWikipediaFlags.test_convert_pdf ____________\r\n\r\nself = <test_samples.TestWikipediaFlags object at 0x0000015977C3F588>\r\n\r\n    def setup_method(self):\r\n        \"Check if files exists, else download.\"\r\n\r\n        self.folder_path = \"%s/samples/wikipedia/flags\" % TEST_ROOT\r\n\r\n        # create directory if not already present\r\n        if not exists(self.folder_path):\r\n            os.mkdir(self.folder_path)\r\n\r\n        # fetch flags.html, if not already present\r\n        path = join(self.folder_path, \"flags.html\")\r\n        if not exists(path):\r\n            u = \"https://en.wikipedia.org/wiki/Gallery_of_sovereign_state_flags\"\r\n            data = self.fetch_file(u)\r\n            if data:\r\n>               open(path, \"w\").write(data)\r\n\r\ntests\\test_samples.py:253:\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\nself = <encodings.cp1252.IncrementalEncoder object at 0x0000015977C3F438>\r\ninput = '<!DOCTYPE html>\\r\\n<html class=\"client-nojs\" lang=\"en\" dir=\"ltr\">\\r\\n<head>\\r\\n<meta charset=\"UTF-8\"/>\\r\\n<title>Gall...unction(){mw.config.set({\"wgBackendResponseTime\":2026,\"wgHostname\":\"mw1216\"});});</script>\\r\\n\\t</body>\\r\\n</html>\\r\\n'\r\nfinal = False\r\n\r\n    def encode(self, input, final=False):\r\n>       return codecs.charmap_encode(input,self.errors,encoding_table)[0]\r\nE       UnicodeEncodeError: 'charmap' codec can't encode character '\\u2010' in position 250325: character maps to <undefined>\r\n\r\n..\\_t_env\\lib\\encodings\\cp1252.py:19: UnicodeEncodeError\r\n______________ ERROR at setup of TestW3CSVG.test_convert_pdf_png ______________\r\n\r\nself = <test_samples.TestW3CSVG object at 0x00000159753C7B00>\r\n\r\n    def setup_method(self):\r\n        \"Check if testsuite archive exists, else download and unpack it.\"\r\n\r\n        server = \"http://www.w3.org\"\r\n        path = \"/Graphics/SVG/Test/20070907/W3C_SVG_12_TinyTestSuite.tar.gz\"\r\n        url = server + path\r\n\r\n        archive_path = basename(url)\r\n        tar_path = splitext(archive_path)[0]\r\n        self.folder_path = join(TEST_ROOT, \"samples\", splitext(tar_path)[0])\r\n        if not exists(self.folder_path):\r\n            if not exists(join(TEST_ROOT, \"samples\", tar_path)):\r\n                if not exists(join(TEST_ROOT, \"samples\", archive_path)):\r\n                    print(\"downloading %s\" % url)\r\n                    try:\r\n                        data = urlopen(url).read()\r\n                    except IOError as details:\r\n                        print(details)\r\n                        print(\"Check your internet connection and try again!\")\r\n                        return\r\n                    archive_path = basename(url)\r\n                    open(join(TEST_ROOT, \"samples\", archive_path), \"wb\").write(data)\r\n                print(\"unpacking %s\" % archive_path)\r\n                tar_data = gzip.open(join(TEST_ROOT, \"samples\", archive_path), \"rb\").read()\r\n                open(join(TEST_ROOT, \"samples\", tar_path), \"wb\").write(tar_data)\r\n            print(\"extracting into %s\" % self.folder_path)\r\n            os.mkdir(self.folder_path)\r\n            tar_file = tarfile.TarFile(join(TEST_ROOT, \"samples\", tar_path))\r\n            tar_file.extractall(self.folder_path)\r\n            if exists(join(TEST_ROOT, \"samples\", tar_path)):\r\n>               os.remove(join(TEST_ROOT, \"samples\", tar_path))\r\nE               PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'e:\\\\Miniconda3\\\\conda-bld\\\\svglib_1495798629498\\\\test_tmp\\\\tests\\\\samples\\\\W3C_SVG_12_TinyTestSuite.tar'\r\n\r\ntests\\test_samples.py:371: PermissionError\r\n---------------------------- Captured stdout setup ----------------------------\r\ndownloading http://www.w3.org/Graphics/SVG/Test/20070907/W3C_SVG_12_TinyTestSuite.tar.gz\r\nunpacking W3C_SVG_12_TinyTestSuite.tar.gz\r\nextracting into e:\\Miniconda3\\conda-bld\\svglib_1495798629498\\test_tmp\\tests\\samples\\W3C_SVG_12_TinyTestSuite\r\n============================== warnings summary ===============================\r\ntests/test_basic.py::TestTransformAttrConverter::()::test_0\r\n  e:\\Miniconda3\\conda-bld\\svglib_1495798629498\\_t_env\\lib\\site-packages\\svglib\\svglib.py:191: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead\r\n    logger.warn(\"Unable to parse transform expression '%s'\" % svgAttr)\r\n\r\ntests/test_samples.py::TestSVGSamples::()::test_convert_pdf\r\n  e:\\Miniconda3\\conda-bld\\svglib_1495798629498\\_t_env\\lib\\site-packages\\svglib\\svglib.py:294: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead\r\n    logger.warn(\"Can't handle color: %s\" % text)\r\n\r\ntests/test_samples.py::TestWikipediaFlags::()::test_convert_pdf\r\n  e:\\Miniconda3\\conda-bld\\svglib_1495798629498\\test_tmp\\tests\\test_samples.py:253: ResourceWarning: unclosed file <_io.TextIOWrapper name='e:\\\\Miniconda3\\\\conda-bld\\\\svglib_1495798629498\\\\test_tmp\\\\tests/samples/wikipedia/flags\\\\flags.html' mode='w' encoding='cp1252'>\r\n    open(path, \"w\").write(data)\r\n\r\ntests/test_samples.py::TestW3CSVG::()::test_convert_pdf_png\r\n  e:\\Miniconda3\\conda-bld\\svglib_1495798629498\\test_tmp\\tests\\test_samples.py:362: ResourceWarning: unclosed file <_io.BufferedWriter name='e:\\\\Miniconda3\\\\conda-bld\\\\svglib_1495798629498\\\\test_tmp\\\\tests\\\\samples\\\\W3C_SVG_12_TinyTestSuite.tar.gz'>\r\n    open(join(TEST_ROOT, \"samples\", archive_path), \"wb\").write(data)\r\n  e:\\Miniconda3\\conda-bld\\svglib_1495798629498\\test_tmp\\tests\\test_samples.py:365: ResourceWarning: unclosed file <_io.BufferedWriter name='e:\\\\Miniconda3\\\\conda-bld\\\\svglib_1495798629498\\\\test_tmp\\\\tests\\\\samples\\\\W3C_SVG_12_TinyTestSuite.tar'>\r\n    open(join(TEST_ROOT, \"samples\", tar_path), \"wb\").write(tar_data)\r\n\r\n-- Docs: http://doc.pytest.org/en/latest/warnings.html\r\n========= 30 passed, 4 skipped, 5 warnings, 2 error in 56.93 seconds ==========\r\n```\r\n\r\nThis happens for both py27 and py35. \r\n\r\nThe tests seem simple to solve, but I notice there's no continuous integration for Windows and Travis actually on the repository. @deeplook is this something you would be interested to add to this project?"}}
{"actor":{"display_login":"nicoddemus"}}