{"html_url": "https://github.com/simonw/datasette/pull/557#issuecomment-877717392", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/557", "id": 877717392, "node_id": "MDEyOklzc3VlQ29tbWVudDg3NzcxNzM5Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-07-10T23:39:48Z", "updated_at": "2021-07-10T23:39:48Z", "author_association": "OWNER", "body": "Abandoning this - need to switch to using GitHub Actions for this instead.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 466996584, "label": "Get tests running on Windows using Travis CI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/557#issuecomment-511625212", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/557", "id": 511625212, "node_id": "MDEyOklzc3VlQ29tbWVudDUxMTYyNTIxMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-07-16T01:12:14Z", "updated_at": "2019-07-16T01:12:14Z", "author_association": "OWNER", "body": "This looks useful for dealing with the `The process cannot access the file because it is being used by another process` error: https://stackoverflow.com/a/28032829", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 466996584, "label": "Get tests running on Windows using Travis CI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/557#issuecomment-511624403", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/557", "id": 511624403, "node_id": "MDEyOklzc3VlQ29tbWVudDUxMTYyNDQwMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-07-16T01:07:27Z", "updated_at": "2019-07-16T01:10:24Z", "author_association": "OWNER", "body": "Woohoo! That got the tests running on Windows. They're pretty slow there unfortunately... and I'm seeing some failures.\r\n\r\nhttps://travis-ci.org/simonw/datasette/jobs/559205729 is the first run against Windows.\r\n```\r\n\r\ncollected 353 items\r\n\r\ntests\\test_cli.py ... [ 0%]\r\ntests\\test_black.py . [ 1%]\r\ntests\\test_api.py ..........F........................................... [ 16%]\r\n.....s..F..................FF...............F...... [ 30%]\r\ntests\\test_cli.py F [ 31%]\r\ntests\\test_csv.py ....... [ 33%]\r\ntests\\test_database.py .... [ 34%]\r\ntests\\test_docs.py ..................................................... [ 49%]\r\n.... [ 50%]\r\ntests\\test_facets.py .....ss. [ 52%]\r\ntests\\test_filters.py ........... [ 55%]\r\ntests\\test_html.py ...FF.....FF..............................F.FF.F..... [ 70%]\r\n.....F [ 72%]\r\ntests\\test_plugins.py ...............F [ 77%]\r\ntests\\test_publish_cloudrun.py ..F. [ 78%]\r\ntests\\test_publish_heroku.py ...FF [ 79%]\r\ntests\\test_publish_now.py ...FF.. [ 81%]\r\ntests\\test_utils.py .............................F...........FFF........ [ 96%]\r\n.............E [100%]\r\n\r\n=================================== ERRORS ====================================\r\n________ ERROR at teardown of test_format_bytes[1099511627776-1.0 TB] _________\r\n\r\n @pytest.fixture(scope=\"session\")\r\n def app_client():\r\n> yield from make_app_client()\r\n\r\n..\\..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:161: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmp_tkydmmd'\r\nonerror = .onerror at 0x0000017D0230CAF8>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmp_tkydmmd\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n================================== FAILURES ===================================\r\n_____________________________ test_allow_sql_off ______________________________\r\n\r\n def test_allow_sql_off():\r\n> for client in make_app_client(config={\"allow_sql\": False}):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_api.py:600: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmp6pkccymo'\r\nonerror = .onerror at 0x0000017D0261FD38>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmp6pkccymo\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n__________ test_table_filter_extra_where_disabled_if_no_sql_allowed ___________\r\n\r\n def test_table_filter_extra_where_disabled_if_no_sql_allowed():\r\n> for client in make_app_client(config={\"allow_sql\": False}):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_api.py:1050: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpfa3zhjsq'\r\nonerror = .onerror at 0x0000017D025E0B88>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpfa3zhjsq\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n____________________________ test_allow_facet_off _____________________________\r\n\r\n def test_allow_facet_off():\r\n> for client in make_app_client(config={\"allow_facet\": False}):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_api.py:1454: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpvap5inq5'\r\nonerror = .onerror at 0x0000017D025DAAF8>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpvap5inq5\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n___________________________ test_suggest_facets_off ___________________________\r\n\r\n def test_suggest_facets_off():\r\n> for client in make_app_client(config={\"suggest_facets\": False}):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_api.py:1461: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmp7hn1_v44'\r\nonerror = .onerror at 0x0000017D0260C5E8>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmp7hn1_v44\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n________________________ test_config_force_https_urls _________________________\r\n\r\n def test_config_force_https_urls():\r\n> for client in make_app_client(config={\"force_https_urls\": True}):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_api.py:1589: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpu3lq69xr'\r\nonerror = .onerror at 0x0000017D02825EE8>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpu3lq69xr\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n________ test_serve_with_inspect_file_prepopulates_table_counts_cache _________\r\n\r\n def test_serve_with_inspect_file_prepopulates_table_counts_cache():\r\n inspect_data = {\"fixtures\": {\"tables\": {\"hithere\": {\"count\": 44}}}}\r\n> for client in make_app_client(inspect_data=inspect_data, is_immutable=True):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_cli.py:36: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpo65sp2ig'\r\nonerror = .onerror at 0x0000017D0240DC18>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpo65sp2ig\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n_____________________________ test_static_mounts ______________________________\r\n\r\n def test_static_mounts():\r\n for client in make_app_client(\r\n> static_mounts=[(\"custom-static\", str(pathlib.Path(__file__).parent))]\r\n ):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_html.py:64: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpqv82mm64'\r\nonerror = .onerror at 0x0000017D0294FD38>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpqv82mm64\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n---------------------------- Captured stderr call -----------------------------\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\travis\\build\\simonw\\datasette\\datasette\\utils\\asgi.py\", line 100, in __call__\r\n return await view(new_scope, receive, send)\r\n File \"C:\\Users\\travis\\build\\simonw\\datasette\\datasette\\utils\\asgi.py\", line 315, in inner_static\r\n await asgi_send_file(send, full_path, chunk_size=chunk_size)\r\n File \"C:\\Users\\travis\\build\\simonw\\datasette\\datasette\\utils\\asgi.py\", line 296, in asgi_send_file\r\n {\"type\": \"http.response.body\", \"body\": chunk, \"more_body\": more_body}\r\n File \"c:\\python37\\lib\\site-packages\\aiofiles\\base.py\", line 92, in __aexit__\r\n yield from self._obj.close()\r\n File \"c:\\python37\\lib\\site-packages\\aiofiles\\threadpool\\utils.py\", line 36, in method\r\n return (yield from self._loop.run_in_executor(self._executor, cb))\r\nconcurrent.futures._base.CancelledError\r\n__________________________ test_memory_database_page __________________________\r\n\r\n def test_memory_database_page():\r\n> for client in make_app_client(memory=True):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_html.py:75: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmp6cagtj6v'\r\nonerror = .onerror at 0x0000017D040A2AF8>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmp6cagtj6v\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n_________________________ test_table_cell_truncation __________________________\r\n\r\n def test_table_cell_truncation():\r\n> for client in make_app_client(config={\"truncate_cells_html\": 5}):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_html.py:123: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmp1zz78pre'\r\nonerror = .onerror at 0x0000017D03DFD5E8>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmp1zz78pre\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n_______________________ test_row_page_does_not_truncate _______________________\r\n\r\n def test_row_page_does_not_truncate():\r\n> for client in make_app_client(config={\"truncate_cells_html\": 5}):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_html.py:148: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpsukb573e'\r\nonerror = .onerror at 0x0000017D023B9AF8>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpsukb573e\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n________________ test_database_download_allowed_for_immutable _________________\r\n\r\n def test_database_download_allowed_for_immutable():\r\n> for client in make_app_client(is_immutable=True):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_html.py:755: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpcivpcoop'\r\nonerror = .onerror at 0x0000017D02666A68>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpcivpcoop\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n---------------------------- Captured stderr call -----------------------------\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\travis\\build\\simonw\\datasette\\datasette\\utils\\asgi.py\", line 100, in __call__\r\n return await view(new_scope, receive, send)\r\n File \"C:\\Users\\travis\\build\\simonw\\datasette\\datasette\\utils\\asgi.py\", line 174, in view\r\n await response.asgi_send(send)\r\n File \"C:\\Users\\travis\\build\\simonw\\datasette\\datasette\\utils\\asgi.py\", line 383, in asgi_send\r\n return await asgi_send_file(send, self.filepath, content_type=self.content_type)\r\n File \"C:\\Users\\travis\\build\\simonw\\datasette\\datasette\\utils\\asgi.py\", line 296, in asgi_send_file\r\n {\"type\": \"http.response.body\", \"body\": chunk, \"more_body\": more_body}\r\n File \"c:\\python37\\lib\\site-packages\\aiofiles\\base.py\", line 92, in __aexit__\r\n yield from self._obj.close()\r\n File \"c:\\python37\\lib\\site-packages\\aiofiles\\threadpool\\utils.py\", line 36, in method\r\n return (yield from self._loop.run_in_executor(self._executor, cb))\r\nconcurrent.futures._base.CancelledError\r\n________________ test_database_download_disallowed_for_memory _________________\r\n\r\n def test_database_download_disallowed_for_memory():\r\n> for client in make_app_client(memory=True):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_html.py:773: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpvwpwrijf'\r\nonerror = .onerror at 0x0000017D02637D38>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpvwpwrijf\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n___________________________ test_allow_download_off ___________________________\r\n\r\n def test_allow_download_off():\r\n> for client in make_app_client(is_immutable=True, config={\"allow_download\": False}):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_html.py:782: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpmz0s6rqz'\r\nonerror = .onerror at 0x0000017D03EFA1F8>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpmz0s6rqz\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n_____________________________ test_allow_sql_off ______________________________\r\n\r\n def test_allow_sql_off():\r\n> for client in make_app_client(config={\"allow_sql\": False}):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_html.py:800: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpmrr0edfk'\r\nonerror = .onerror at 0x0000017D03EFFD38>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpmrr0edfk\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n__________________________ test_custom_table_include __________________________\r\n\r\n def test_custom_table_include():\r\n for client in make_app_client(\r\n> template_dir=str(pathlib.Path(__file__).parent / \"test_templates\")\r\n ):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_html.py:973: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpxcd2zp24'\r\nonerror = .onerror at 0x0000017D03FFBD38>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpxcd2zp24\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n______________________ test_plugins_extra_template_vars _______________________\r\n\r\nrestore_working_directory = None\r\n\r\n def test_plugins_extra_template_vars(restore_working_directory):\r\n for client in make_app_client(\r\n> template_dir=str(pathlib.Path(__file__).parent / \"test_templates\")\r\n ):\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_plugins.py:196: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\fixtures.py:156: in make_app_client\r\n yield client\r\nc:\\python37\\lib\\tempfile.py:805: in __exit__\r\n self.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:400: in _rmtree_unsafe\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpkjbhg_ho'\r\nonerror = .onerror at 0x0000017D03DB6DC8>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n> os.unlink(fullname)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpkjbhg_ho\\\\fixtures.db'\r\n\r\nc:\\python37\\lib\\shutil.py:398: PermissionError\r\n____________________________ test_publish_cloudrun ____________________________\r\n\r\nmock_call = \r\nmock_output = \r\nmock_which = \r\n\r\n @mock.patch(\"shutil.which\")\r\n @mock.patch(\"datasette.publish.cloudrun.check_output\")\r\n @mock.patch(\"datasette.publish.cloudrun.check_call\")\r\n def test_publish_cloudrun(mock_call, mock_output, mock_which):\r\n mock_output.return_value = \"myproject\"\r\n mock_which.return_value = True\r\n runner = CliRunner()\r\n with runner.isolated_filesystem():\r\n open(\"test.db\", \"w\").write(\"data\")\r\n result = runner.invoke(cli.cli, [\"publish\", \"cloudrun\", \"test.db\"])\r\n> assert 0 == result.exit_code\r\nE AssertionError: assert 0 == 1\r\nE + where 1 = .exit_code\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_publish_cloudrun.py:37: AssertionError\r\n_____________________________ test_publish_heroku _____________________________\r\n\r\nmock_call = \r\nmock_check_output = \r\nmock_which = \r\n\r\n @mock.patch(\"shutil.which\")\r\n @mock.patch(\"datasette.publish.heroku.check_output\")\r\n @mock.patch(\"datasette.publish.heroku.call\")\r\n def test_publish_heroku(mock_call, mock_check_output, mock_which):\r\n mock_which.return_value = True\r\n mock_check_output.side_effect = lambda s: {\r\n \"['heroku', 'plugins']\": b\"heroku-builds\",\r\n \"['heroku', 'apps:list', '--json']\": b\"[]\",\r\n \"['heroku', 'apps:create', 'datasette', '--json']\": b'{\"name\": \"f\"}',\r\n }[repr(s)]\r\n runner = CliRunner()\r\n with runner.isolated_filesystem():\r\n open(\"test.db\", \"w\").write(\"data\")\r\n result = runner.invoke(cli.cli, [\"publish\", \"heroku\", \"test.db\"])\r\n> assert 0 == result.exit_code, result.output\r\nE AssertionError: \r\nE assert 0 == 1\r\nE + where 1 = .exit_code\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_publish_heroku.py:59: AssertionError\r\n_____________________ test_publish_heroku_plugin_secrets ______________________\r\n\r\nmock_call = \r\nmock_check_output = \r\nmock_which = \r\n\r\n @mock.patch(\"shutil.which\")\r\n @mock.patch(\"datasette.publish.heroku.check_output\")\r\n @mock.patch(\"datasette.publish.heroku.call\")\r\n def test_publish_heroku_plugin_secrets(mock_call, mock_check_output, mock_which):\r\n mock_which.return_value = True\r\n mock_check_output.side_effect = lambda s: {\r\n \"['heroku', 'plugins']\": b\"heroku-builds\",\r\n \"['heroku', 'apps:list', '--json']\": b\"[]\",\r\n \"['heroku', 'apps:create', 'datasette', '--json']\": b'{\"name\": \"f\"}',\r\n }[repr(s)]\r\n runner = CliRunner()\r\n with runner.isolated_filesystem():\r\n open(\"test.db\", \"w\").write(\"data\")\r\n result = runner.invoke(\r\n cli.cli,\r\n [\r\n \"publish\",\r\n \"heroku\",\r\n \"test.db\",\r\n \"--plugin-secret\",\r\n \"datasette-auth-github\",\r\n \"client_id\",\r\n \"x-client-id\",\r\n ],\r\n )\r\n> assert 0 == result.exit_code, result.output\r\nE AssertionError: \r\nE assert 0 == 1\r\nE + where 1 = .exit_code\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_publish_heroku.py:90: AssertionError\r\n______________________________ test_publish_now _______________________________\r\n\r\nmock_run = \r\nmock_which = \r\n\r\n @mock.patch(\"shutil.which\")\r\n @mock.patch(\"datasette.publish.now.run\")\r\n def test_publish_now(mock_run, mock_which):\r\n mock_which.return_value = True\r\n runner = CliRunner()\r\n with runner.isolated_filesystem():\r\n open(\"test.db\", \"w\").write(\"data\")\r\n result = runner.invoke(cli.cli, [\"publish\", \"nowv1\", \"test.db\"])\r\n> assert 0 == result.exit_code\r\nE AssertionError: assert 0 == 1\r\nE + where 1 = .exit_code\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_publish_now.py:43: AssertionError\r\n________________________ test_publish_now_force_token _________________________\r\n\r\nmock_run = \r\nmock_which = \r\n\r\n @mock.patch(\"shutil.which\")\r\n @mock.patch(\"datasette.publish.now.run\")\r\n def test_publish_now_force_token(mock_run, mock_which):\r\n mock_which.return_value = True\r\n runner = CliRunner()\r\n with runner.isolated_filesystem():\r\n open(\"test.db\", \"w\").write(\"data\")\r\n result = runner.invoke(\r\n cli.cli, [\"publish\", \"nowv1\", \"test.db\", \"--force\", \"--token=X\"]\r\n )\r\n> assert 0 == result.exit_code\r\nE AssertionError: assert 0 == 1\r\nE + where 1 = .exit_code\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_publish_now.py:57: AssertionError\r\n_______________________________ test_detect_fts _______________________________\r\n\r\n def test_detect_fts():\r\n sql = \"\"\"\r\n CREATE TABLE \"Dumb_Table\" (\r\n \"TreeID\" INTEGER,\r\n \"qSpecies\" TEXT\r\n );\r\n CREATE TABLE \"Street_Tree_List\" (\r\n \"TreeID\" INTEGER,\r\n \"qSpecies\" TEXT,\r\n \"qAddress\" TEXT,\r\n \"SiteOrder\" INTEGER,\r\n \"qSiteInfo\" TEXT,\r\n \"PlantType\" TEXT,\r\n \"qCaretaker\" TEXT\r\n );\r\n CREATE VIEW Test_View AS SELECT * FROM Dumb_Table;\r\n CREATE VIRTUAL TABLE \"Street_Tree_List_fts\" USING FTS4 (\"qAddress\", \"qCaretaker\", \"qSpecies\", content=\"Street_Tree_List\");\r\n CREATE VIRTUAL TABLE r USING rtree(a, b, c);\r\n \"\"\"\r\n conn = utils.sqlite3.connect(\":memory:\")\r\n> conn.executescript(sql)\r\nE sqlite3.OperationalError: no such module: rtree\r\n\r\n..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_utils.py:182: OperationalError\r\n_______________ test_temporary_docker_directory_uses_hard_link ________________\r\n\r\n def test_temporary_docker_directory_uses_hard_link():\r\n with tempfile.TemporaryDirectory() as td:\r\n os.chdir(td)\r\n open(\"hello\", \"w\").write(\"world\")\r\n # Default usage of this should use symlink\r\n with utils.temporary_docker_directory(\r\n files=[\"hello\"],\r\n name=\"t\",\r\n metadata=None,\r\n extra_options=None,\r\n branch=None,\r\n template_dir=None,\r\n plugins_dir=None,\r\n static=[],\r\n install=[],\r\n spatialite=False,\r\n version_note=None,\r\n ) as temp_docker:\r\n hello = os.path.join(temp_docker, \"hello\")\r\n assert \"world\" == open(hello).read()\r\n # It should be a hard link\r\n> assert 2 == os.stat(hello).st_nlink\r\n\r\n..\\..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_utils.py:239: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\nc:\\python37\\lib\\contextlib.py:119: in __exit__\r\n next(self.gen)\r\n..\\..\\..\\..\\..\\build\\simonw\\datasette\\datasette\\utils\\__init__.py:397: in temporary_docker_directory\r\n tmp.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:395: in _rmtree_unsafe\r\n _rmtree_unsafe(fullname, onerror)\r\nc:\\python37\\lib\\shutil.py:404: in _rmtree_unsafe\r\n onerror(os.rmdir, path, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmp0g07cby1\\\\t'\r\nonerror = .onerror at 0x0000017D0230C5E8>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n os.unlink(fullname)\r\n except OSError:\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n try:\r\n> os.rmdir(path)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmp0g07cby1\\\\t'\r\n\r\nc:\\python37\\lib\\shutil.py:402: PermissionError\r\n________ test_temporary_docker_directory_uses_copy_if_hard_link_fails _________\r\n\r\nmock_link = \r\n\r\n @patch(\"os.link\")\r\n def test_temporary_docker_directory_uses_copy_if_hard_link_fails(mock_link):\r\n # Copy instead if os.link raises OSError (normally due to different device)\r\n mock_link.side_effect = OSError\r\n with tempfile.TemporaryDirectory() as td:\r\n os.chdir(td)\r\n open(\"hello\", \"w\").write(\"world\")\r\n # Default usage of this should use symlink\r\n with utils.temporary_docker_directory(\r\n files=[\"hello\"],\r\n name=\"t\",\r\n metadata=None,\r\n extra_options=None,\r\n branch=None,\r\n template_dir=None,\r\n plugins_dir=None,\r\n static=[],\r\n install=[],\r\n spatialite=False,\r\n version_note=None,\r\n ) as temp_docker:\r\n hello = os.path.join(temp_docker, \"hello\")\r\n assert \"world\" == open(hello).read()\r\n # It should be a copy, not a hard link\r\n> assert 1 == os.stat(hello).st_nlink\r\n\r\n..\\..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_utils.py:266: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\nc:\\python37\\lib\\contextlib.py:119: in __exit__\r\n next(self.gen)\r\n..\\..\\..\\..\\..\\build\\simonw\\datasette\\datasette\\utils\\__init__.py:397: in temporary_docker_directory\r\n tmp.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:395: in _rmtree_unsafe\r\n _rmtree_unsafe(fullname, onerror)\r\nc:\\python37\\lib\\shutil.py:404: in _rmtree_unsafe\r\n onerror(os.rmdir, path, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpywj5p10g\\\\t'\r\nonerror = .onerror at 0x0000017D0230C558>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n os.unlink(fullname)\r\n except OSError:\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n try:\r\n> os.rmdir(path)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmpywj5p10g\\\\t'\r\n\r\nc:\\python37\\lib\\shutil.py:402: PermissionError\r\n_________________ test_temporary_docker_directory_quotes_args _________________\r\n\r\n def test_temporary_docker_directory_quotes_args():\r\n with tempfile.TemporaryDirectory() as td:\r\n os.chdir(td)\r\n open(\"hello\", \"w\").write(\"world\")\r\n with utils.temporary_docker_directory(\r\n files=[\"hello\"],\r\n name=\"t\",\r\n metadata=None,\r\n extra_options=\"--$HOME\",\r\n branch=None,\r\n template_dir=None,\r\n plugins_dir=None,\r\n static=[],\r\n install=[],\r\n spatialite=False,\r\n version_note=\"$PWD\",\r\n ) as temp_docker:\r\n df = os.path.join(temp_docker, \"Dockerfile\")\r\n df_contents = open(df).read()\r\n assert \"'$PWD'\" in df_contents\r\n> assert \"'--$HOME'\" in df_contents\r\n\r\n..\\..\\..\\..\\..\\build\\simonw\\datasette\\tests\\test_utils.py:289: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\nc:\\python37\\lib\\contextlib.py:119: in __exit__\r\n next(self.gen)\r\n..\\..\\..\\..\\..\\build\\simonw\\datasette\\datasette\\utils\\__init__.py:397: in temporary_docker_directory\r\n tmp.cleanup()\r\nc:\\python37\\lib\\tempfile.py:809: in cleanup\r\n _shutil.rmtree(self.name)\r\nc:\\python37\\lib\\shutil.py:516: in rmtree\r\n return _rmtree_unsafe(path, onerror)\r\nc:\\python37\\lib\\shutil.py:395: in _rmtree_unsafe\r\n _rmtree_unsafe(fullname, onerror)\r\nc:\\python37\\lib\\shutil.py:404: in _rmtree_unsafe\r\n onerror(os.rmdir, path, sys.exc_info())\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\npath = 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmps8mll2fo\\\\t'\r\nonerror = .onerror at 0x0000017D0230C948>\r\n\r\n def _rmtree_unsafe(path, onerror):\r\n try:\r\n with os.scandir(path) as scandir_it:\r\n entries = list(scandir_it)\r\n except OSError:\r\n onerror(os.scandir, path, sys.exc_info())\r\n entries = []\r\n for entry in entries:\r\n fullname = entry.path\r\n try:\r\n is_dir = entry.is_dir(follow_symlinks=False)\r\n except OSError:\r\n is_dir = False\r\n if is_dir:\r\n try:\r\n if entry.is_symlink():\r\n # This can only happen if someone replaces\r\n # a directory with a symlink after the call to\r\n # os.scandir or entry.is_dir above.\r\n raise OSError(\"Cannot call rmtree on a symbolic link\")\r\n except OSError:\r\n onerror(os.path.islink, fullname, sys.exc_info())\r\n continue\r\n _rmtree_unsafe(fullname, onerror)\r\n else:\r\n try:\r\n os.unlink(fullname)\r\n except OSError:\r\n onerror(os.unlink, fullname, sys.exc_info())\r\n try:\r\n> os.rmdir(path)\r\nE PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\travis\\\\AppData\\\\Local\\\\Temp\\\\tmps8mll2fo\\\\t'\r\n\r\nc:\\python37\\lib\\shutil.py:402: PermissionError\r\n========= 25 failed, 325 passed, 3 skipped, 1 error in 476.71 seconds =========\r\ntravis_time:end:07fbb22c:start=1563238899952083900,finish=1563239378532569000,duration=478580485100\r\n\u001b[0K\u001b[31;1mThe command \"pytest\" exited with 1.\u001b[0m\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 466996584, "label": "Get tests running on Windows using Travis CI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/557#issuecomment-510562059", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/557", "id": 510562059, "node_id": "MDEyOklzc3VlQ29tbWVudDUxMDU2MjA1OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-07-11T16:38:27Z", "updated_at": "2019-07-11T16:38:27Z", "author_association": "OWNER", "body": "Weird, Travis didn't even attempt to start a build for this branch/PR. Maybe something wrong with my `.travis.yml`?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 466996584, "label": "Get tests running on Windows using Travis CI"}, "performed_via_github_app": null}