-
-
Save simonw/4b1fdd24496b989fca56bc757be345ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2021-07-11T01:33:24.6523019Z Found online and idle hosted runner(s) in the current repository's organization account that matches the required labels: 'windows-latest' | |
2021-07-11T01:33:24.6523075Z Waiting for a hosted runner in 'organization' to pick this job... | |
2021-07-11T01:33:33.2631120Z Current runner version: '2.278.0' | |
2021-07-11T01:33:33.2871347Z ##[group]Operating System | |
2021-07-11T01:33:33.2872225Z Microsoft Windows Server 2019 | |
2021-07-11T01:33:33.2872652Z 10.0.17763 | |
2021-07-11T01:33:33.2873062Z Datacenter | |
2021-07-11T01:33:33.2873486Z ##[endgroup] | |
2021-07-11T01:33:33.2873979Z ##[group]Virtual Environment | |
2021-07-11T01:33:33.2874520Z Environment: windows-2019 | |
2021-07-11T01:33:33.2875010Z Version: 20210628.1 | |
2021-07-11T01:33:33.2875902Z Included Software: https://github.com/actions/virtual-environments/blob/win19/20210628.1/images/win/Windows2019-Readme.md | |
2021-07-11T01:33:33.2877096Z Image Release: https://github.com/actions/virtual-environments/releases/tag/win19%2F20210628.1 | |
2021-07-11T01:33:33.2877861Z ##[endgroup] | |
2021-07-11T01:33:33.2879671Z ##[group]GITHUB_TOKEN Permissions | |
2021-07-11T01:33:33.2880738Z Actions: write | |
2021-07-11T01:33:33.2881190Z Checks: write | |
2021-07-11T01:33:33.2881597Z Contents: write | |
2021-07-11T01:33:33.2882185Z Deployments: write | |
2021-07-11T01:33:33.2882691Z Discussions: write | |
2021-07-11T01:33:33.2883154Z Issues: write | |
2021-07-11T01:33:33.2883556Z Metadata: read | |
2021-07-11T01:33:33.2884019Z Packages: write | |
2021-07-11T01:33:33.2884478Z PullRequests: write | |
2021-07-11T01:33:33.2885039Z RepositoryProjects: write | |
2021-07-11T01:33:33.2885572Z SecurityEvents: write | |
2021-07-11T01:33:33.2886066Z Statuses: write | |
2021-07-11T01:33:33.2886594Z ##[endgroup] | |
2021-07-11T01:33:33.2889426Z Prepare workflow directory | |
2021-07-11T01:33:33.3575364Z Prepare all required actions | |
2021-07-11T01:33:33.3585723Z Getting action download info | |
2021-07-11T01:33:33.7001415Z Download action repository 'actions/checkout@v2' | |
2021-07-11T01:33:34.5363832Z Download action repository 'actions/setup-python@v2' | |
2021-07-11T01:33:34.7934038Z Download action repository 'actions/cache@v2' | |
2021-07-11T01:33:35.7728426Z ##[group]Run actions/checkout@v2 | |
2021-07-11T01:33:35.7729125Z with: | |
2021-07-11T01:33:35.7729565Z repository: simonw/datasette | |
2021-07-11T01:33:35.7730489Z token: *** | |
2021-07-11T01:33:35.7730923Z ssh-strict: true | |
2021-07-11T01:33:35.7731460Z persist-credentials: true | |
2021-07-11T01:33:35.7731945Z clean: true | |
2021-07-11T01:33:35.7732339Z fetch-depth: 1 | |
2021-07-11T01:33:35.7732741Z lfs: false | |
2021-07-11T01:33:35.7733131Z submodules: false | |
2021-07-11T01:33:35.7733553Z ##[endgroup] | |
2021-07-11T01:33:38.2088535Z Syncing repository: simonw/datasette | |
2021-07-11T01:33:38.2301241Z ##[group]Getting Git version info | |
2021-07-11T01:33:38.2302300Z Working directory is 'D:\a\datasette\datasette' | |
2021-07-11T01:33:38.2596547Z [command]"C:\Program Files\Git\bin\git.exe" version | |
2021-07-11T01:33:38.2781586Z git version 2.32.0.windows.1 | |
2021-07-11T01:33:38.2824465Z ##[endgroup] | |
2021-07-11T01:33:38.2829880Z Deleting the contents of 'D:\a\datasette\datasette' | |
2021-07-11T01:33:38.2834047Z ##[group]Initializing the repository | |
2021-07-11T01:33:38.2843845Z [command]"C:\Program Files\Git\bin\git.exe" init D:\a\datasette\datasette | |
2021-07-11T01:33:38.4523279Z Initialized empty Git repository in D:/a/datasette/datasette/.git/ | |
2021-07-11T01:33:38.4573403Z [command]"C:\Program Files\Git\bin\git.exe" remote add origin https://github.com/simonw/datasette | |
2021-07-11T01:33:38.5019383Z ##[endgroup] | |
2021-07-11T01:33:38.5020392Z ##[group]Disabling automatic garbage collection | |
2021-07-11T01:33:38.5045809Z [command]"C:\Program Files\Git\bin\git.exe" config --local gc.auto 0 | |
2021-07-11T01:33:38.5544584Z ##[endgroup] | |
2021-07-11T01:33:38.5582695Z ##[group]Setting up auth | |
2021-07-11T01:33:38.5584287Z [command]"C:\Program Files\Git\bin\git.exe" config --local --name-only --get-regexp core\.sshCommand | |
2021-07-11T01:33:38.5791205Z [command]"C:\Program Files\Git\bin\git.exe" submodule foreach --recursive "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" | |
2021-07-11T01:33:40.4690056Z [command]"C:\Program Files\Git\bin\git.exe" config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader | |
2021-07-11T01:33:40.4898505Z [command]"C:\Program Files\Git\bin\git.exe" submodule foreach --recursive "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" | |
2021-07-11T01:33:40.9059645Z [command]"C:\Program Files\Git\bin\git.exe" config --local http.https://github.com/.extraheader "AUTHORIZATION: basic ***" | |
2021-07-11T01:33:40.9297088Z ##[endgroup] | |
2021-07-11T01:33:40.9300916Z ##[group]Fetching the repository | |
2021-07-11T01:33:40.9311979Z [command]"C:\Program Files\Git\bin\git.exe" -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +b990abf1e045887f59f664e80d1c4f22cff2b781:refs/remotes/origin/windows-github-actions | |
2021-07-11T01:33:42.5265252Z remote: Enumerating objects: 203, done. | |
2021-07-11T01:33:42.5270227Z remote: Counting objects: 0% (1/203) | |
2021-07-11T01:33:42.5271161Z remote: Counting objects: 1% (3/203) | |
2021-07-11T01:33:42.5271654Z remote: Counting objects: 2% (5/203) | |
2021-07-11T01:33:42.5273136Z remote: Counting objects: 3% (7/203) | |
2021-07-11T01:33:42.5274722Z remote: Counting objects: 4% (9/203) | |
2021-07-11T01:33:42.5276931Z remote: Counting objects: 5% (11/203) | |
2021-07-11T01:33:42.5277478Z remote: Counting objects: 6% (13/203) | |
2021-07-11T01:33:42.5277944Z remote: Counting objects: 7% (15/203) | |
2021-07-11T01:33:42.5278407Z remote: Counting objects: 8% (17/203) | |
2021-07-11T01:33:42.5278849Z remote: Counting objects: 9% (19/203) | |
2021-07-11T01:33:42.5279309Z remote: Counting objects: 10% (21/203) | |
2021-07-11T01:33:42.5280836Z remote: Counting objects: 11% (23/203) | |
2021-07-11T01:33:42.5284456Z remote: Counting objects: 12% (25/203) | |
2021-07-11T01:33:42.5285897Z remote: Counting objects: 13% (27/203) | |
2021-07-11T01:33:42.5287615Z remote: Counting objects: 14% (29/203) | |
2021-07-11T01:33:42.5288181Z remote: Counting objects: 15% (31/203) | |
2021-07-11T01:33:42.5288643Z remote: Counting objects: 16% (33/203) | |
2021-07-11T01:33:42.5289102Z remote: Counting objects: 17% (35/203) | |
2021-07-11T01:33:42.5291099Z remote: Counting objects: 18% (37/203) | |
2021-07-11T01:33:42.5291587Z remote: Counting objects: 19% (39/203) | |
2021-07-11T01:33:42.5293012Z remote: Counting objects: 20% (41/203) | |
2021-07-11T01:33:42.5293482Z remote: Counting objects: 21% (43/203) | |
2021-07-11T01:33:42.5294990Z remote: Counting objects: 22% (45/203) | |
2021-07-11T01:33:42.5295479Z remote: Counting objects: 23% (47/203) | |
2021-07-11T01:33:42.5295925Z remote: Counting objects: 24% (49/203) | |
2021-07-11T01:33:42.5296399Z remote: Counting objects: 25% (51/203) | |
2021-07-11T01:33:42.5296940Z remote: Counting objects: 26% (53/203) | |
2021-07-11T01:33:42.5298174Z remote: Counting objects: 27% (55/203) | |
2021-07-11T01:33:42.5298671Z remote: Counting objects: 28% (57/203) | |
2021-07-11T01:33:42.5299116Z remote: Counting objects: 29% (59/203) | |
2021-07-11T01:33:42.5299578Z remote: Counting objects: 30% (61/203) | |
2021-07-11T01:33:42.5300777Z remote: Counting objects: 31% (63/203) | |
2021-07-11T01:33:42.5301375Z remote: Counting objects: 32% (65/203) | |
2021-07-11T01:33:42.5301838Z remote: Counting objects: 33% (67/203) | |
2021-07-11T01:33:42.5302281Z remote: Counting objects: 34% (70/203) | |
2021-07-11T01:33:42.5303300Z remote: Counting objects: 35% (72/203) | |
2021-07-11T01:33:42.5303806Z remote: Counting objects: 36% (74/203) | |
2021-07-11T01:33:42.5304265Z remote: Counting objects: 37% (76/203) | |
2021-07-11T01:33:42.5304723Z remote: Counting objects: 38% (78/203) | |
2021-07-11T01:33:42.5305175Z remote: Counting objects: 39% (80/203) | |
2021-07-11T01:33:42.5305615Z remote: Counting objects: 40% (82/203) | |
2021-07-11T01:33:42.5307972Z remote: Counting objects: 41% (84/203) | |
2021-07-11T01:33:42.5310103Z remote: Counting objects: 42% (86/203) | |
2021-07-11T01:33:42.5310647Z remote: Counting objects: 43% (88/203) | |
2021-07-11T01:33:42.5311110Z remote: Counting objects: 44% (90/203) | |
2021-07-11T01:33:42.5311554Z remote: Counting objects: 45% (92/203) | |
2021-07-11T01:33:42.5312008Z remote: Counting objects: 46% (94/203) | |
2021-07-11T01:33:42.5313442Z remote: Counting objects: 47% (96/203) | |
2021-07-11T01:33:42.5314578Z remote: Counting objects: 48% (98/203) | |
2021-07-11T01:33:42.5315038Z remote: Counting objects: 49% (100/203) | |
2021-07-11T01:33:42.5316208Z remote: Counting objects: 50% (102/203) | |
2021-07-11T01:33:42.5317364Z remote: Counting objects: 51% (104/203) | |
2021-07-11T01:33:42.5317929Z remote: Counting objects: 52% (106/203) | |
2021-07-11T01:33:42.5319024Z remote: Counting objects: 53% (108/203) | |
2021-07-11T01:33:42.5320521Z remote: Counting objects: 54% (110/203) | |
2021-07-11T01:33:42.5321047Z remote: Counting objects: 55% (112/203) | |
2021-07-11T01:33:42.5321497Z remote: Counting objects: 56% (114/203) | |
2021-07-11T01:33:42.5321953Z remote: Counting objects: 57% (116/203) | |
2021-07-11T01:33:42.5322393Z remote: Counting objects: 58% (118/203) | |
2021-07-11T01:33:42.5322853Z remote: Counting objects: 59% (120/203) | |
2021-07-11T01:33:42.5324202Z remote: Counting objects: 60% (122/203) | |
2021-07-11T01:33:42.5326126Z remote: Counting objects: 61% (124/203) | |
2021-07-11T01:33:42.5328058Z remote: Counting objects: 62% (126/203) | |
2021-07-11T01:33:42.5328629Z remote: Counting objects: 63% (128/203) | |
2021-07-11T01:33:42.5329868Z remote: Counting objects: 64% (130/203) | |
2021-07-11T01:33:42.5331360Z remote: Counting objects: 65% (132/203) | |
2021-07-11T01:33:42.5332504Z remote: Counting objects: 66% (134/203) | |
2021-07-11T01:33:42.5332972Z remote: Counting objects: 67% (137/203) | |
2021-07-11T01:33:42.5334266Z remote: Counting objects: 68% (139/203) | |
2021-07-11T01:33:42.5335358Z remote: Counting objects: 69% (141/203) | |
2021-07-11T01:33:42.5335867Z remote: Counting objects: 70% (143/203) | |
2021-07-11T01:33:42.5337040Z remote: Counting objects: 71% (145/203) | |
2021-07-11T01:33:42.5338472Z remote: Counting objects: 72% (147/203) | |
2021-07-11T01:33:42.5339696Z remote: Counting objects: 73% (149/203) | |
2021-07-11T01:33:42.5340159Z remote: Counting objects: 74% (151/203) | |
2021-07-11T01:33:42.5340622Z remote: Counting objects: 75% (153/203) | |
2021-07-11T01:33:42.5341925Z remote: Counting objects: 76% (155/203) | |
2021-07-11T01:33:42.5343033Z remote: Counting objects: 77% (157/203) | |
2021-07-11T01:33:42.5343524Z remote: Counting objects: 78% (159/203) | |
2021-07-11T01:33:42.5344792Z remote: Counting objects: 79% (161/203) | |
2021-07-11T01:33:42.5345870Z remote: Counting objects: 80% (163/203) | |
2021-07-11T01:33:42.5347285Z remote: Counting objects: 81% (165/203) | |
2021-07-11T01:33:42.5347781Z remote: Counting objects: 82% (167/203) | |
2021-07-11T01:33:42.5348952Z remote: Counting objects: 83% (169/203) | |
2021-07-11T01:33:42.5350506Z remote: Counting objects: 84% (171/203) | |
2021-07-11T01:33:42.5352355Z remote: Counting objects: 85% (173/203) | |
2021-07-11T01:33:42.5352953Z remote: Counting objects: 86% (175/203) | |
2021-07-11T01:33:42.5353409Z remote: Counting objects: 87% (177/203) | |
2021-07-11T01:33:42.5353875Z remote: Counting objects: 88% (179/203) | |
2021-07-11T01:33:42.5354321Z remote: Counting objects: 89% (181/203) | |
2021-07-11T01:33:42.5356311Z remote: Counting objects: 90% (183/203) | |
2021-07-11T01:33:42.5356990Z remote: Counting objects: 91% (185/203) | |
2021-07-11T01:33:42.5357446Z remote: Counting objects: 92% (187/203) | |
2021-07-11T01:33:42.5357916Z remote: Counting objects: 93% (189/203) | |
2021-07-11T01:33:42.5360930Z remote: Counting objects: 94% (191/203) | |
2021-07-11T01:33:42.5361448Z remote: Counting objects: 95% (193/203) | |
2021-07-11T01:33:42.5362927Z remote: Counting objects: 96% (195/203) | |
2021-07-11T01:33:42.5363398Z remote: Counting objects: 97% (197/203) | |
2021-07-11T01:33:42.5363861Z remote: Counting objects: 98% (199/203) | |
2021-07-11T01:33:42.5364306Z remote: Counting objects: 99% (201/203) | |
2021-07-11T01:33:42.5364766Z remote: Counting objects: 100% (203/203) | |
2021-07-11T01:33:42.5366958Z remote: Counting objects: 100% (203/203), done. | |
2021-07-11T01:33:42.5367524Z remote: Compressing objects: 0% (1/180) | |
2021-07-11T01:33:42.5368049Z remote: Compressing objects: 1% (2/180) | |
2021-07-11T01:33:42.5369289Z remote: Compressing objects: 2% (4/180) | |
2021-07-11T01:33:42.5369809Z remote: Compressing objects: 3% (6/180) | |
2021-07-11T01:33:42.5370314Z remote: Compressing objects: 4% (8/180) | |
2021-07-11T01:33:42.5373645Z remote: Compressing objects: 5% (9/180) | |
2021-07-11T01:33:42.5374154Z remote: Compressing objects: 6% (11/180) | |
2021-07-11T01:33:42.5375587Z remote: Compressing objects: 7% (13/180) | |
2021-07-11T01:33:42.5378417Z remote: Compressing objects: 8% (15/180) | |
2021-07-11T01:33:42.5378952Z remote: Compressing objects: 9% (17/180) | |
2021-07-11T01:33:42.5379458Z remote: Compressing objects: 10% (18/180) | |
2021-07-11T01:33:42.5380733Z remote: Compressing objects: 11% (20/180) | |
2021-07-11T01:33:42.5381277Z remote: Compressing objects: 12% (22/180) | |
2021-07-11T01:33:42.5383231Z remote: Compressing objects: 13% (24/180) | |
2021-07-11T01:33:42.5385059Z remote: Compressing objects: 14% (26/180) | |
2021-07-11T01:33:42.5386287Z remote: Compressing objects: 15% (27/180) | |
2021-07-11T01:33:42.5386846Z remote: Compressing objects: 16% (29/180) | |
2021-07-11T01:33:42.5387351Z remote: Compressing objects: 17% (31/180) | |
2021-07-11T01:33:42.5387850Z remote: Compressing objects: 18% (33/180) | |
2021-07-11T01:33:42.5388358Z remote: Compressing objects: 19% (35/180) | |
2021-07-11T01:33:42.5388841Z remote: Compressing objects: 20% (36/180) | |
2021-07-11T01:33:42.5389343Z remote: Compressing objects: 21% (38/180) | |
2021-07-11T01:33:42.5389824Z remote: Compressing objects: 22% (40/180) | |
2021-07-11T01:33:42.5390320Z remote: Compressing objects: 23% (42/180) | |
2021-07-11T01:33:42.5390805Z remote: Compressing objects: 24% (44/180) | |
2021-07-11T01:33:42.5391301Z remote: Compressing objects: 25% (45/180) | |
2021-07-11T01:33:42.5391789Z remote: Compressing objects: 26% (47/180) | |
2021-07-11T01:33:42.5392282Z remote: Compressing objects: 27% (49/180) | |
2021-07-11T01:33:42.5392777Z remote: Compressing objects: 28% (51/180) | |
2021-07-11T01:33:42.5393255Z remote: Compressing objects: 29% (53/180) | |
2021-07-11T01:33:42.5393752Z remote: Compressing objects: 30% (54/180) | |
2021-07-11T01:33:42.5394230Z remote: Compressing objects: 31% (56/180) | |
2021-07-11T01:33:42.5394726Z remote: Compressing objects: 32% (58/180) | |
2021-07-11T01:33:42.5395206Z remote: Compressing objects: 33% (60/180) | |
2021-07-11T01:33:42.5395696Z remote: Compressing objects: 34% (62/180) | |
2021-07-11T01:33:42.5396989Z remote: Compressing objects: 35% (63/180) | |
2021-07-11T01:33:42.5397577Z remote: Compressing objects: 36% (65/180) | |
2021-07-11T01:33:42.5398093Z remote: Compressing objects: 37% (67/180) | |
2021-07-11T01:33:42.5398579Z remote: Compressing objects: 38% (69/180) | |
2021-07-11T01:33:42.5399097Z remote: Compressing objects: 39% (71/180) | |
2021-07-11T01:33:42.5399579Z remote: Compressing objects: 40% (72/180) | |
2021-07-11T01:33:42.5400073Z remote: Compressing objects: 41% (74/180) | |
2021-07-11T01:33:42.5400668Z remote: Compressing objects: 42% (76/180) | |
2021-07-11T01:33:42.5401988Z remote: Compressing objects: 43% (78/180) | |
2021-07-11T01:33:42.5402499Z remote: Compressing objects: 44% (80/180) | |
2021-07-11T01:33:42.5403001Z remote: Compressing objects: 45% (81/180) | |
2021-07-11T01:33:42.5403504Z remote: Compressing objects: 46% (83/180) | |
2021-07-11T01:33:42.5403989Z remote: Compressing objects: 47% (85/180) | |
2021-07-11T01:33:42.5405853Z remote: Compressing objects: 48% (87/180) | |
2021-07-11T01:33:42.5407432Z remote: Compressing objects: 49% (89/180) | |
2021-07-11T01:33:42.5407963Z remote: Compressing objects: 50% (90/180) | |
2021-07-11T01:33:42.5408456Z remote: Compressing objects: 51% (92/180) | |
2021-07-11T01:33:42.5410261Z remote: Compressing objects: 52% (94/180) | |
2021-07-11T01:33:42.5412249Z remote: Compressing objects: 53% (96/180) | |
2021-07-11T01:33:42.5413335Z remote: Compressing objects: 54% (98/180) | |
2021-07-11T01:33:42.5413894Z remote: Compressing objects: 55% (99/180) | |
2021-07-11T01:33:42.5415723Z remote: Compressing objects: 56% (101/180) | |
2021-07-11T01:33:42.5416275Z remote: Compressing objects: 57% (103/180) | |
2021-07-11T01:33:42.5416807Z remote: Compressing objects: 58% (105/180) | |
2021-07-11T01:33:42.5417309Z remote: Compressing objects: 59% (107/180) | |
2021-07-11T01:33:42.5417793Z remote: Compressing objects: 60% (108/180) | |
2021-07-11T01:33:42.5418288Z remote: Compressing objects: 61% (110/180) | |
2021-07-11T01:33:42.5418773Z remote: Compressing objects: 62% (112/180) | |
2021-07-11T01:33:42.5419273Z remote: Compressing objects: 63% (114/180) | |
2021-07-11T01:33:42.5420896Z remote: Compressing objects: 64% (116/180) | |
2021-07-11T01:33:42.5421422Z remote: Compressing objects: 65% (117/180) | |
2021-07-11T01:33:42.5422898Z remote: Compressing objects: 66% (119/180) | |
2021-07-11T01:33:42.5425468Z remote: Compressing objects: 67% (121/180) | |
2021-07-11T01:33:42.5427285Z remote: Compressing objects: 68% (123/180) | |
2021-07-11T01:33:42.5427849Z remote: Compressing objects: 69% (125/180) | |
2021-07-11T01:33:42.5428355Z remote: Compressing objects: 70% (126/180) | |
2021-07-11T01:33:42.5429580Z remote: Compressing objects: 71% (128/180) | |
2021-07-11T01:33:42.5430094Z remote: Compressing objects: 72% (130/180) | |
2021-07-11T01:33:42.5430595Z remote: Compressing objects: 73% (132/180) | |
2021-07-11T01:33:42.5432275Z remote: Compressing objects: 74% (134/180) | |
2021-07-11T01:33:42.5432808Z remote: Compressing objects: 75% (135/180) | |
2021-07-11T01:33:42.5433295Z remote: Compressing objects: 76% (137/180) | |
2021-07-11T01:33:42.5436518Z remote: Compressing objects: 77% (139/180) | |
2021-07-11T01:33:42.5437093Z remote: Compressing objects: 78% (141/180) | |
2021-07-11T01:33:42.5437592Z remote: Compressing objects: 79% (143/180) | |
2021-07-11T01:33:42.5438084Z remote: Compressing objects: 80% (144/180) | |
2021-07-11T01:33:42.5439163Z remote: Compressing objects: 81% (146/180) | |
2021-07-11T01:33:42.5440225Z remote: Compressing objects: 82% (148/180) | |
2021-07-11T01:33:42.5440864Z remote: Compressing objects: 83% (150/180) | |
2021-07-11T01:33:42.5441369Z remote: Compressing objects: 84% (152/180) | |
2021-07-11T01:33:42.5441853Z remote: Compressing objects: 85% (153/180) | |
2021-07-11T01:33:42.5442349Z remote: Compressing objects: 86% (155/180) | |
2021-07-11T01:33:42.5442834Z remote: Compressing objects: 87% (157/180) | |
2021-07-11T01:33:42.5443533Z remote: Compressing objects: 88% (159/180) | |
2021-07-11T01:33:42.5448752Z remote: Compressing objects: 89% (161/180) | |
2021-07-11T01:33:42.5449298Z remote: Compressing objects: 90% (162/180) | |
2021-07-11T01:33:42.5449814Z remote: Compressing objects: 91% (164/180) | |
2021-07-11T01:33:42.5452023Z remote: Compressing objects: 92% (166/180) | |
2021-07-11T01:33:42.5452679Z remote: Compressing objects: 93% (168/180) | |
2021-07-11T01:33:42.5454108Z remote: Compressing objects: 94% (170/180) | |
2021-07-11T01:33:42.5454656Z remote: Compressing objects: 95% (171/180) | |
2021-07-11T01:33:42.5455152Z remote: Compressing objects: 96% (173/180) | |
2021-07-11T01:33:42.5455657Z remote: Compressing objects: 97% (175/180) | |
2021-07-11T01:33:42.5456135Z remote: Compressing objects: 98% (177/180) | |
2021-07-11T01:33:42.5456633Z remote: Compressing objects: 99% (179/180) | |
2021-07-11T01:33:42.5457131Z remote: Compressing objects: 100% (180/180) | |
2021-07-11T01:33:42.5457674Z remote: Compressing objects: 100% (180/180), done. | |
2021-07-11T01:33:42.5458165Z Receiving objects: 0% (1/203) | |
2021-07-11T01:33:42.5458567Z Receiving objects: 1% (3/203) | |
2021-07-11T01:33:42.5458976Z Receiving objects: 2% (5/203) | |
2021-07-11T01:33:42.5459374Z Receiving objects: 3% (7/203) | |
2021-07-11T01:33:42.5459790Z Receiving objects: 4% (9/203) | |
2021-07-11T01:33:42.5460186Z Receiving objects: 5% (11/203) | |
2021-07-11T01:33:42.5460593Z Receiving objects: 6% (13/203) | |
2021-07-11T01:33:42.5460989Z Receiving objects: 7% (15/203) | |
2021-07-11T01:33:42.5461389Z Receiving objects: 8% (17/203) | |
2021-07-11T01:33:42.5461801Z Receiving objects: 9% (19/203) | |
2021-07-11T01:33:42.5462195Z Receiving objects: 10% (21/203) | |
2021-07-11T01:33:42.5462605Z Receiving objects: 11% (23/203) | |
2021-07-11T01:33:42.5463000Z Receiving objects: 12% (25/203) | |
2021-07-11T01:33:42.5463401Z Receiving objects: 13% (27/203) | |
2021-07-11T01:33:42.5463799Z Receiving objects: 14% (29/203) | |
2021-07-11T01:33:42.5464204Z Receiving objects: 15% (31/203) | |
2021-07-11T01:33:42.5465017Z Receiving objects: 16% (33/203) | |
2021-07-11T01:33:42.5465450Z Receiving objects: 17% (35/203) | |
2021-07-11T01:33:42.5465847Z Receiving objects: 18% (37/203) | |
2021-07-11T01:33:42.5466258Z Receiving objects: 19% (39/203) | |
2021-07-11T01:33:42.5466740Z Receiving objects: 20% (41/203) | |
2021-07-11T01:33:42.5467151Z Receiving objects: 21% (43/203) | |
2021-07-11T01:33:42.5467543Z Receiving objects: 22% (45/203) | |
2021-07-11T01:33:42.5467947Z Receiving objects: 23% (47/203) | |
2021-07-11T01:33:42.5468342Z Receiving objects: 24% (49/203) | |
2021-07-11T01:33:42.5468746Z Receiving objects: 25% (51/203) | |
2021-07-11T01:33:42.5469135Z Receiving objects: 26% (53/203) | |
2021-07-11T01:33:42.5469538Z Receiving objects: 27% (55/203) | |
2021-07-11T01:33:42.5469929Z Receiving objects: 28% (57/203) | |
2021-07-11T01:33:42.5470337Z Receiving objects: 29% (59/203) | |
2021-07-11T01:33:42.5470728Z Receiving objects: 30% (61/203) | |
2021-07-11T01:33:42.5471133Z Receiving objects: 31% (63/203) | |
2021-07-11T01:33:42.5471524Z Receiving objects: 32% (65/203) | |
2021-07-11T01:33:42.5471934Z Receiving objects: 33% (67/203) | |
2021-07-11T01:33:42.5472338Z Receiving objects: 34% (70/203) | |
2021-07-11T01:33:42.5472728Z Receiving objects: 35% (72/203) | |
2021-07-11T01:33:42.5473134Z Receiving objects: 36% (74/203) | |
2021-07-11T01:33:42.5473527Z Receiving objects: 37% (76/203) | |
2021-07-11T01:33:42.5473928Z Receiving objects: 38% (78/203) | |
2021-07-11T01:33:42.5478446Z Receiving objects: 39% (80/203) | |
2021-07-11T01:33:42.5479018Z Receiving objects: 40% (82/203) | |
2021-07-11T01:33:42.5479512Z Receiving objects: 41% (84/203) | |
2021-07-11T01:33:42.5479988Z Receiving objects: 42% (86/203) | |
2021-07-11T01:33:42.5480475Z Receiving objects: 43% (88/203) | |
2021-07-11T01:33:42.5480942Z Receiving objects: 44% (90/203) | |
2021-07-11T01:33:42.5481420Z Receiving objects: 45% (92/203) | |
2021-07-11T01:33:42.5481897Z Receiving objects: 46% (94/203) | |
2021-07-11T01:33:42.5482357Z Receiving objects: 47% (96/203) | |
2021-07-11T01:33:42.5482845Z Receiving objects: 48% (98/203) | |
2021-07-11T01:33:42.5483329Z Receiving objects: 49% (100/203) | |
2021-07-11T01:33:42.5483815Z Receiving objects: 50% (102/203) | |
2021-07-11T01:33:42.5484289Z Receiving objects: 51% (104/203) | |
2021-07-11T01:33:42.5484881Z Receiving objects: 52% (106/203) | |
2021-07-11T01:33:42.5485360Z Receiving objects: 53% (108/203) | |
2021-07-11T01:33:42.5485826Z Receiving objects: 54% (110/203) | |
2021-07-11T01:33:42.5486311Z Receiving objects: 55% (112/203) | |
2021-07-11T01:33:42.5486822Z Receiving objects: 56% (114/203) | |
2021-07-11T01:33:42.5487290Z Receiving objects: 57% (116/203) | |
2021-07-11T01:33:42.5487769Z Receiving objects: 58% (118/203) | |
2021-07-11T01:33:42.5488233Z Receiving objects: 59% (120/203) | |
2021-07-11T01:33:42.5488715Z Receiving objects: 60% (122/203) | |
2021-07-11T01:33:42.5489191Z Receiving objects: 61% (124/203) | |
2021-07-11T01:33:42.5489652Z Receiving objects: 62% (126/203) | |
2021-07-11T01:33:42.5490124Z Receiving objects: 63% (128/203) | |
2021-07-11T01:33:42.5490585Z Receiving objects: 64% (130/203) | |
2021-07-11T01:33:42.5491074Z Receiving objects: 65% (132/203) | |
2021-07-11T01:33:42.5491548Z Receiving objects: 66% (134/203) | |
2021-07-11T01:33:42.5492006Z Receiving objects: 67% (137/203) | |
2021-07-11T01:33:42.5492484Z Receiving objects: 68% (139/203) | |
2021-07-11T01:33:42.5492945Z Receiving objects: 69% (141/203) | |
2021-07-11T01:33:42.5493426Z Receiving objects: 70% (143/203) | |
2021-07-11T01:33:42.5493899Z Receiving objects: 71% (145/203) | |
2021-07-11T01:33:42.5494362Z Receiving objects: 72% (147/203) | |
2021-07-11T01:33:42.5494840Z Receiving objects: 73% (149/203) | |
2021-07-11T01:33:42.5495307Z Receiving objects: 74% (151/203) | |
2021-07-11T01:33:42.5495790Z Receiving objects: 75% (153/203) | |
2021-07-11T01:33:42.5496262Z Receiving objects: 76% (155/203) | |
2021-07-11T01:33:42.5496744Z Receiving objects: 77% (157/203) | |
2021-07-11T01:33:42.5497219Z Receiving objects: 78% (159/203) | |
2021-07-11T01:33:42.5497679Z Receiving objects: 79% (161/203) | |
2021-07-11T01:33:42.5498153Z Receiving objects: 80% (163/203) | |
2021-07-11T01:33:42.5498725Z Receiving objects: 81% (165/203) | |
2021-07-11T01:33:42.5499198Z Receiving objects: 82% (167/203) | |
2021-07-11T01:33:42.5499673Z Receiving objects: 83% (169/203) | |
2021-07-11T01:33:42.5500142Z Receiving objects: 84% (171/203) | |
2021-07-11T01:33:42.5500618Z Receiving objects: 85% (173/203) | |
2021-07-11T01:33:42.5501096Z Receiving objects: 86% (175/203) | |
2021-07-11T01:33:42.5501557Z Receiving objects: 87% (177/203) | |
2021-07-11T01:33:42.5502035Z Receiving objects: 88% (179/203) | |
2021-07-11T01:33:42.5502500Z Receiving objects: 89% (181/203) | |
2021-07-11T01:33:42.5503086Z remote: Total 203 (delta 11), reused 87 (delta 3), pack-reused 0 | |
2021-07-11T01:33:42.5503667Z Receiving objects: 90% (183/203) | |
2021-07-11T01:33:42.5504217Z Receiving objects: 91% (185/203) | |
2021-07-11T01:33:42.5504630Z Receiving objects: 92% (187/203) | |
2021-07-11T01:33:42.5505022Z Receiving objects: 93% (189/203) | |
2021-07-11T01:33:42.5505431Z Receiving objects: 94% (191/203) | |
2021-07-11T01:33:42.5505826Z Receiving objects: 95% (193/203) | |
2021-07-11T01:33:42.5506237Z Receiving objects: 96% (195/203) | |
2021-07-11T01:33:42.5506654Z Receiving objects: 97% (197/203) | |
2021-07-11T01:33:42.5507064Z Receiving objects: 98% (199/203) | |
2021-07-11T01:33:42.5507474Z Receiving objects: 99% (201/203) | |
2021-07-11T01:33:42.5507862Z Receiving objects: 100% (203/203) | |
2021-07-11T01:33:42.5508331Z Receiving objects: 100% (203/203), 610.31 KiB | 11.10 MiB/s, done. | |
2021-07-11T01:33:42.5508776Z Resolving deltas: 0% (0/11) | |
2021-07-11T01:33:42.5509170Z Resolving deltas: 9% (1/11) | |
2021-07-11T01:33:42.5509549Z Resolving deltas: 18% (2/11) | |
2021-07-11T01:33:42.5510045Z Resolving deltas: 27% (3/11) | |
2021-07-11T01:33:42.5510489Z Resolving deltas: 36% (4/11) | |
2021-07-11T01:33:42.5510952Z Resolving deltas: 45% (5/11) | |
2021-07-11T01:33:42.5511418Z Resolving deltas: 54% (6/11) | |
2021-07-11T01:33:42.5511862Z Resolving deltas: 63% (7/11) | |
2021-07-11T01:33:42.5512327Z Resolving deltas: 72% (8/11) | |
2021-07-11T01:33:42.5512784Z Resolving deltas: 81% (9/11) | |
2021-07-11T01:33:42.5513253Z Resolving deltas: 90% (10/11) | |
2021-07-11T01:33:42.5513720Z Resolving deltas: 100% (11/11) | |
2021-07-11T01:33:42.5514195Z Resolving deltas: 100% (11/11), done. | |
2021-07-11T01:33:42.5964295Z From https://github.com/simonw/datasette | |
2021-07-11T01:33:42.5965655Z * [new ref] b990abf1e045887f59f664e80d1c4f22cff2b781 -> origin/windows-github-actions | |
2021-07-11T01:33:42.6119803Z ##[endgroup] | |
2021-07-11T01:33:42.6120727Z ##[group]Determining the checkout info | |
2021-07-11T01:33:42.6121789Z ##[endgroup] | |
2021-07-11T01:33:42.6122336Z ##[group]Checking out the ref | |
2021-07-11T01:33:42.6133261Z [command]"C:\Program Files\Git\bin\git.exe" checkout --progress --force -B windows-github-actions refs/remotes/origin/windows-github-actions | |
2021-07-11T01:33:42.7209613Z Branch 'windows-github-actions' set up to track remote branch 'windows-github-actions' from 'origin'. | |
2021-07-11T01:33:42.7212622Z Switched to a new branch 'windows-github-actions' | |
2021-07-11T01:33:42.7251248Z ##[endgroup] | |
2021-07-11T01:33:42.7502960Z [command]"C:\Program Files\Git\bin\git.exe" log -1 --format='%H' | |
2021-07-11T01:33:42.7681970Z 'b990abf1e045887f59f664e80d1c4f22cff2b781' | |
2021-07-11T01:33:42.8025562Z ##[group]Run actions/setup-python@v2 | |
2021-07-11T01:33:42.8026065Z with: | |
2021-07-11T01:33:42.8026417Z python-version: 3.6 | |
2021-07-11T01:33:42.8027362Z token: *** | |
2021-07-11T01:33:42.8027687Z ##[endgroup] | |
2021-07-11T01:33:42.8988861Z Successfully setup CPython (3.6.8) | |
2021-07-11T01:33:43.0742926Z ##[group]Run actions/cache@v2 | |
2021-07-11T01:33:43.0743376Z with: | |
2021-07-11T01:33:43.0743686Z path: ~/.cache/pip | |
2021-07-11T01:33:43.0744864Z key: Windows-pip-5fb95955e4801facaf1a888a36a1e6fe50d07529b2102fa1a054765c07aa87ca | |
2021-07-11T01:33:43.0746140Z restore-keys: Windows-pip- | |
2021-07-11T01:33:43.0746533Z env: | |
2021-07-11T01:33:43.0747139Z pythonLocation: C:\hostedtoolcache\windows\Python\3.6.8\x64 | |
2021-07-11T01:33:43.0747645Z ##[endgroup] | |
2021-07-11T01:33:43.8037126Z Received 30 of 30 (100.0%), 0.0 MBs/sec | |
2021-07-11T01:33:43.8039021Z Cache Size: ~0 MB (30 B) | |
2021-07-11T01:33:43.8056977Z [command]C:\Windows\System32\tar.exe -z -xf D:/a/_temp/1853589a-62c3-4cd5-8d60-9dd9e8ed2836/cache.tgz -P -C D:/a/datasette/datasette | |
2021-07-11T01:33:43.8155135Z Cache restored successfully | |
2021-07-11T01:33:43.9055597Z Cache restored from key: Windows-pip-5fb95955e4801facaf1a888a36a1e6fe50d07529b2102fa1a054765c07aa87ca | |
2021-07-11T01:33:43.9312782Z ##[group]Run pip install -e '.[test]' | |
2021-07-11T01:33:43.9313415Z [36;1mpip install -e '.[test]'[0m | |
2021-07-11T01:33:43.9359141Z shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'" | |
2021-07-11T01:33:43.9359688Z env: | |
2021-07-11T01:33:43.9360215Z pythonLocation: C:\hostedtoolcache\windows\Python\3.6.8\x64 | |
2021-07-11T01:33:43.9360889Z ##[endgroup] | |
2021-07-11T01:33:51.2134070Z Obtaining file:///D:/a/datasette/datasette | |
2021-07-11T01:33:53.7248412Z Collecting asgiref<3.4.0,>=3.2.10 | |
2021-07-11T01:33:53.7926772Z Downloading asgiref-3.3.4-py3-none-any.whl (22 kB) | |
2021-07-11T01:33:54.0029151Z Collecting click<8.1.0,>=7.1.1 | |
2021-07-11T01:33:54.0113367Z Downloading click-8.0.1-py3-none-any.whl (97 kB) | |
2021-07-11T01:33:54.1808788Z Collecting click-default-group~=1.2.2 | |
2021-07-11T01:33:54.1869460Z Downloading click-default-group-1.2.2.tar.gz (3.3 kB) | |
2021-07-11T01:33:54.7054196Z Collecting Jinja2<3.1.0,>=2.10.3 | |
2021-07-11T01:33:54.7148099Z Downloading Jinja2-3.0.1-py3-none-any.whl (133 kB) | |
2021-07-11T01:33:54.7961809Z Collecting hupper~=1.9 | |
2021-07-11T01:33:54.8050512Z Downloading hupper-1.10.3-py2.py3-none-any.whl (26 kB) | |
2021-07-11T01:33:54.8713647Z Collecting httpx>=0.17 | |
2021-07-11T01:33:54.8801895Z Downloading httpx-0.18.2-py3-none-any.whl (76 kB) | |
2021-07-11T01:33:54.9399015Z Collecting pint~=0.9 | |
2021-07-11T01:33:54.9713138Z Downloading Pint-0.17-py2.py3-none-any.whl (204 kB) | |
2021-07-11T01:33:55.0365379Z Collecting pluggy~=0.13.0 | |
2021-07-11T01:33:55.0457651Z Downloading pluggy-0.13.1-py2.py3-none-any.whl (18 kB) | |
2021-07-11T01:33:55.1165135Z Collecting uvicorn~=0.11 | |
2021-07-11T01:33:55.1254844Z Downloading uvicorn-0.14.0-py3-none-any.whl (50 kB) | |
2021-07-11T01:33:55.1690525Z Collecting aiofiles<0.8,>=0.4 | |
2021-07-11T01:33:55.1777455Z Downloading aiofiles-0.7.0-py3-none-any.whl (13 kB) | |
2021-07-11T01:33:55.2203578Z Collecting janus<0.7,>=0.4 | |
2021-07-11T01:33:55.2295973Z Downloading janus-0.6.1-py3-none-any.whl (11 kB) | |
2021-07-11T01:33:55.2643814Z Collecting asgi-csrf>=0.9 | |
2021-07-11T01:33:55.2729516Z Downloading asgi_csrf-0.9-py3-none-any.whl (10 kB) | |
2021-07-11T01:33:55.3657325Z Collecting PyYAML~=5.3 | |
2021-07-11T01:33:55.3764166Z Downloading PyYAML-5.4.1-cp36-cp36m-win_amd64.whl (209 kB) | |
2021-07-11T01:33:55.4426915Z Collecting mergedeep<1.4.0,>=1.1.1 | |
2021-07-11T01:33:55.4509243Z Downloading mergedeep-1.3.4-py3-none-any.whl (6.4 kB) | |
2021-07-11T01:33:55.4900698Z Collecting itsdangerous<3.0,>=1.1 | |
2021-07-11T01:33:55.4983519Z Downloading itsdangerous-2.0.1-py3-none-any.whl (18 kB) | |
2021-07-11T01:33:55.5303406Z Collecting python-baseconv==1.2.2 | |
2021-07-11T01:33:55.5379461Z Downloading python-baseconv-1.2.2.tar.gz (4.9 kB) | |
2021-07-11T01:33:55.9494165Z Collecting pytest<6.3.0,>=5.2.2 | |
2021-07-11T01:33:55.9587011Z Downloading pytest-6.2.4-py3-none-any.whl (280 kB) | |
2021-07-11T01:33:56.0497758Z Collecting pytest-xdist<2.4,>=2.2.1 | |
2021-07-11T01:33:56.0583519Z Downloading pytest_xdist-2.3.0-py3-none-any.whl (37 kB) | |
2021-07-11T01:33:56.1076548Z Collecting pytest-asyncio<0.16,>=0.10 | |
2021-07-11T01:33:56.1158237Z Downloading pytest_asyncio-0.15.1-py3-none-any.whl (12 kB) | |
2021-07-11T01:33:56.1643041Z Collecting beautifulsoup4<4.10.0,>=4.8.1 | |
2021-07-11T01:33:56.1712819Z Downloading beautifulsoup4-4.9.3-py3-none-any.whl (115 kB) | |
2021-07-11T01:33:56.2268736Z Collecting black==21.6b0 | |
2021-07-11T01:33:56.2361202Z Downloading black-21.6b0-py3-none-any.whl (140 kB) | |
2021-07-11T01:33:56.2813079Z Collecting pytest-timeout<1.5,>=1.4.2 | |
2021-07-11T01:33:56.2896910Z Downloading pytest_timeout-1.4.2-py2.py3-none-any.whl (10 kB) | |
2021-07-11T01:33:56.3386154Z Collecting trustme<0.9,>=0.7 | |
2021-07-11T01:33:56.3452311Z Downloading trustme-0.8.0-py2.py3-none-any.whl (16 kB) | |
2021-07-11T01:33:57.0092123Z Collecting regex>=2020.1.8 | |
2021-07-11T01:33:57.0216220Z Downloading regex-2021.7.6-cp36-cp36m-win_amd64.whl (270 kB) | |
2021-07-11T01:33:57.0810786Z Collecting pathspec<1,>=0.8.1 | |
2021-07-11T01:33:57.0903002Z Downloading pathspec-0.8.1-py2.py3-none-any.whl (28 kB) | |
2021-07-11T01:33:57.1986211Z Collecting typed-ast>=1.4.2 | |
2021-07-11T01:33:57.2085061Z Downloading typed_ast-1.4.3-cp36-cp36m-win_amd64.whl (155 kB) | |
2021-07-11T01:33:57.2607393Z Collecting toml>=0.10.1 | |
2021-07-11T01:33:57.2691469Z Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB) | |
2021-07-11T01:33:57.3012417Z Collecting dataclasses>=0.6 | |
2021-07-11T01:33:57.3099130Z Downloading dataclasses-0.8-py3-none-any.whl (19 kB) | |
2021-07-11T01:33:57.3459353Z Collecting mypy-extensions>=0.4.3 | |
2021-07-11T01:33:57.3543480Z Downloading mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB) | |
2021-07-11T01:33:57.3876503Z Collecting appdirs | |
2021-07-11T01:33:57.3962051Z Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB) | |
2021-07-11T01:33:57.4341071Z Collecting typing-extensions>=3.7.4 | |
2021-07-11T01:33:57.4430699Z Downloading typing_extensions-3.10.0.0-py3-none-any.whl (26 kB) | |
2021-07-11T01:33:57.4856825Z Collecting python-multipart | |
2021-07-11T01:33:57.4956325Z Downloading python-multipart-0.0.5.tar.gz (32 kB) | |
2021-07-11T01:33:57.9165383Z Collecting soupsieve>1.2 | |
2021-07-11T01:33:57.9254263Z Downloading soupsieve-2.2.1-py3-none-any.whl (33 kB) | |
2021-07-11T01:33:57.9869431Z Collecting colorama | |
2021-07-11T01:33:57.9956797Z Downloading colorama-0.4.4-py2.py3-none-any.whl (16 kB) | |
2021-07-11T01:33:58.0940830Z Collecting importlib-metadata | |
2021-07-11T01:33:58.1033494Z Downloading importlib_metadata-4.6.1-py3-none-any.whl (17 kB) | |
2021-07-11T01:33:58.1692473Z Collecting certifi | |
2021-07-11T01:33:58.1799804Z Downloading certifi-2021.5.30-py2.py3-none-any.whl (145 kB) | |
2021-07-11T01:33:58.2467726Z Collecting httpcore<0.14.0,>=0.13.3 | |
2021-07-11T01:33:58.2557990Z Downloading httpcore-0.13.6-py3-none-any.whl (58 kB) | |
2021-07-11T01:33:58.2963622Z Collecting rfc3986[idna2008]<2,>=1.3 | |
2021-07-11T01:33:58.3047709Z Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB) | |
2021-07-11T01:33:58.3345562Z Collecting sniffio | |
2021-07-11T01:33:58.3430000Z Downloading sniffio-1.2.0-py3-none-any.whl (10 kB) | |
2021-07-11T01:33:58.3793858Z Collecting async-generator | |
2021-07-11T01:33:58.3881147Z Downloading async_generator-1.10-py3-none-any.whl (18 kB) | |
2021-07-11T01:33:58.4347953Z Collecting h11<0.13,>=0.11 | |
2021-07-11T01:33:58.4434716Z Downloading h11-0.12.0-py3-none-any.whl (54 kB) | |
2021-07-11T01:33:58.4986961Z Collecting anyio==3.* | |
2021-07-11T01:33:58.5070026Z Downloading anyio-3.2.1-py3-none-any.whl (75 kB) | |
2021-07-11T01:33:58.5845925Z Collecting idna>=2.8 | |
2021-07-11T01:33:58.5930401Z Downloading idna-3.2-py3-none-any.whl (59 kB) | |
2021-07-11T01:33:58.6316225Z Collecting contextvars>=2.1 | |
2021-07-11T01:33:58.6404982Z Downloading contextvars-2.4.tar.gz (9.6 kB) | |
2021-07-11T01:33:58.9968985Z Collecting immutables>=0.9 | |
2021-07-11T01:33:59.0063773Z Downloading immutables-0.15-cp36-cp36m-win_amd64.whl (56 kB) | |
2021-07-11T01:33:59.1661886Z Collecting MarkupSafe>=2.0 | |
2021-07-11T01:33:59.1761748Z Downloading MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl (14 kB) | |
2021-07-11T01:34:01.5351934Z Collecting packaging | |
2021-07-11T01:34:01.5352654Z Downloading packaging-21.0-py3-none-any.whl (40 kB) | |
2021-07-11T01:34:01.5353344Z Collecting importlib-resources | |
2021-07-11T01:34:01.5354098Z Downloading importlib_resources-5.2.0-py3-none-any.whl (27 kB) | |
2021-07-11T01:34:01.5354731Z Collecting zipp>=0.5 | |
2021-07-11T01:34:01.5355247Z Downloading zipp-3.5.0-py3-none-any.whl (5.7 kB) | |
2021-07-11T01:34:01.5355777Z Collecting attrs>=19.2.0 | |
2021-07-11T01:34:01.5356357Z Downloading attrs-21.2.0-py2.py3-none-any.whl (53 kB) | |
2021-07-11T01:34:01.5356958Z Collecting atomicwrites>=1.0 | |
2021-07-11T01:34:01.5357707Z Downloading atomicwrites-1.4.0-py2.py3-none-any.whl (6.8 kB) | |
2021-07-11T01:34:01.5358414Z Collecting iniconfig | |
2021-07-11T01:34:01.5359145Z Downloading iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB) | |
2021-07-11T01:34:01.5359784Z Collecting py>=1.8.2 | |
2021-07-11T01:34:01.5360300Z Downloading py-1.10.0-py2.py3-none-any.whl (97 kB) | |
2021-07-11T01:34:01.5361319Z Collecting pytest-forked | |
2021-07-11T01:34:01.5362007Z Downloading pytest_forked-1.3.0-py2.py3-none-any.whl (4.7 kB) | |
2021-07-11T01:34:01.5362631Z Collecting execnet>=1.1 | |
2021-07-11T01:34:01.5363272Z Downloading execnet-1.9.0-py2.py3-none-any.whl (39 kB) | |
2021-07-11T01:34:01.5363919Z Collecting cryptography | |
2021-07-11T01:34:01.5364589Z Downloading cryptography-3.4.7-cp36-abi3-win_amd64.whl (1.6 MB) | |
2021-07-11T01:34:01.5365222Z Collecting cffi>=1.12 | |
2021-07-11T01:34:01.5365757Z Downloading cffi-1.14.6-cp36-cp36m-win_amd64.whl (178 kB) | |
2021-07-11T01:34:01.5366286Z Collecting pycparser | |
2021-07-11T01:34:01.5366955Z Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB) | |
2021-07-11T01:34:01.5367600Z Collecting pyparsing>=2.0.2 | |
2021-07-11T01:34:01.5368275Z Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB) | |
2021-07-11T01:34:01.6305345Z Collecting six>=1.4.0 | |
2021-07-11T01:34:01.6393107Z Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) | |
2021-07-11T01:34:01.6696867Z Using legacy 'setup.py install' for python-baseconv, since package 'wheel' is not installed. | |
2021-07-11T01:34:01.6699950Z Using legacy 'setup.py install' for click-default-group, since package 'wheel' is not installed. | |
2021-07-11T01:34:01.6703089Z Using legacy 'setup.py install' for contextvars, since package 'wheel' is not installed. | |
2021-07-11T01:34:01.6708475Z Using legacy 'setup.py install' for python-multipart, since package 'wheel' is not installed. | |
2021-07-11T01:34:01.9687376Z Installing collected packages: immutables, zipp, typing-extensions, contextvars, sniffio, pyparsing, importlib-metadata, idna, dataclasses, async-generator, toml, six, rfc3986, pycparser, py, pluggy, packaging, iniconfig, h11, colorama, attrs, atomicwrites, anyio, python-multipart, pytest, MarkupSafe, itsdangerous, importlib-resources, httpcore, click, cffi, certifi, asgiref, uvicorn, typed-ast, soupsieve, regex, PyYAML, python-baseconv, pytest-forked, pint, pathspec, mypy-extensions, mergedeep, Jinja2, janus, hupper, httpx, execnet, cryptography, click-default-group, asgi-csrf, appdirs, aiofiles, trustme, pytest-xdist, pytest-timeout, pytest-asyncio, datasette, black, beautifulsoup4 | |
2021-07-11T01:34:02.0981893Z Running setup.py install for contextvars: started | |
2021-07-11T01:34:02.4313384Z Running setup.py install for contextvars: finished with status 'done' | |
2021-07-11T01:34:04.9127120Z Running setup.py install for python-multipart: started | |
2021-07-11T01:34:05.5177956Z Running setup.py install for python-multipart: finished with status 'done' | |
2021-07-11T01:34:07.8706157Z Running setup.py install for python-baseconv: started | |
2021-07-11T01:34:08.1755030Z Running setup.py install for python-baseconv: finished with status 'done' | |
2021-07-11T01:34:09.5866544Z Running setup.py install for click-default-group: started | |
2021-07-11T01:34:09.9083295Z Running setup.py install for click-default-group: finished with status 'done' | |
2021-07-11T01:34:10.3037965Z Running setup.py develop for datasette | |
2021-07-11T01:34:11.4384145Z Successfully installed Jinja2-3.0.1 MarkupSafe-2.0.1 PyYAML-5.4.1 aiofiles-0.7.0 anyio-3.2.1 appdirs-1.4.4 asgi-csrf-0.9 asgiref-3.3.4 async-generator-1.10 atomicwrites-1.4.0 attrs-21.2.0 beautifulsoup4-4.9.3 black-21.6b0 certifi-2021.5.30 cffi-1.14.6 click-8.0.1 click-default-group-1.2.2 colorama-0.4.4 contextvars-2.4 cryptography-3.4.7 dataclasses-0.8 datasette-0.58a1 execnet-1.9.0 h11-0.12.0 httpcore-0.13.6 httpx-0.18.2 hupper-1.10.3 idna-3.2 immutables-0.15 importlib-metadata-4.6.1 importlib-resources-5.2.0 iniconfig-1.1.1 itsdangerous-2.0.1 janus-0.6.1 mergedeep-1.3.4 mypy-extensions-0.4.3 packaging-21.0 pathspec-0.8.1 pint-0.17 pluggy-0.13.1 py-1.10.0 pycparser-2.20 pyparsing-2.4.7 pytest-6.2.4 pytest-asyncio-0.15.1 pytest-forked-1.3.0 pytest-timeout-1.4.2 pytest-xdist-2.3.0 python-baseconv-1.2.2 python-multipart-0.0.5 regex-2021.7.6 rfc3986-1.5.0 six-1.16.0 sniffio-1.2.0 soupsieve-2.2.1 toml-0.10.2 trustme-0.8.0 typed-ast-1.4.3 typing-extensions-3.10.0.0 uvicorn-0.14.0 zipp-3.5.0 | |
2021-07-11T01:34:12.2320223Z ##[group]Run pytest | |
2021-07-11T01:34:12.2320710Z [36;1mpytest[0m | |
2021-07-11T01:34:12.2363849Z shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'" | |
2021-07-11T01:34:12.2364355Z env: | |
2021-07-11T01:34:12.2364869Z pythonLocation: C:\hostedtoolcache\windows\Python\3.6.8\x64 | |
2021-07-11T01:34:12.2365413Z ##[endgroup] | |
2021-07-11T01:34:16.5029601Z ============================= test session starts ============================= | |
2021-07-11T01:34:16.5030752Z platform win32 -- Python 3.6.8, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 | |
2021-07-11T01:34:16.5031500Z SQLite: 3.21.0 | |
2021-07-11T01:34:16.5032207Z rootdir: D:\a\datasette\datasette, configfile: pytest.ini | |
2021-07-11T01:34:16.5033222Z plugins: anyio-3.2.1, asyncio-0.15.1, forked-1.3.0, timeout-1.4.2, xdist-2.3.0 | |
2021-07-11T01:34:16.5034068Z collected 924 items | |
2021-07-11T01:34:16.5034473Z | |
2021-07-11T01:34:16.5576711Z tests\test_package.py FF [ 0%] | |
2021-07-11T01:34:36.6683854Z tests\test_cli.py . [ 0%] | |
2021-07-11T01:34:36.7771763Z tests\test_cli_serve_get.py .F [ 0%] | |
2021-07-11T01:34:36.8002187Z tests\test_cli.py . [ 0%] | |
2021-07-11T01:34:41.4709754Z tests\test_black.py . [ 0%] | |
2021-07-11T01:36:17.8703920Z tests\test_api.py ....................................................F. [ 6%] | |
2021-07-11T01:43:31.4341601Z ...FFFF.........ss..F......................FF....................F...FF. [ 14%] | |
2021-07-11T01:44:39.0972339Z .....................s.............. [ 18%] | |
2021-07-11T01:45:03.5604090Z tests\test_auth.py ............ [ 19%] | |
2021-07-11T01:52:14.7760301Z tests\test_canned_queries.py ..E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E........ [ 22%] | |
2021-07-11T01:52:14.9693264Z ...... [ 23%] | |
2021-07-11T01:52:37.8993077Z tests\test_cli.py F.F.................... [ 25%] | |
2021-07-11T01:52:44.3657967Z tests\test_cli_serve_server.py ..s [ 25%] | |
2021-07-11T01:52:44.8172677Z tests\test_config_dir.py .....F.... [ 26%] | |
2021-07-11T01:53:07.1250365Z tests\test_crossdb.py ... [ 27%] | |
2021-07-11T01:54:32.6644901Z tests\test_csv.py ............... [ 28%] | |
2021-07-11T01:55:16.2637690Z tests\test_custom_pages.py FFFFFFFFF.... [ 30%] | |
2021-07-11T01:55:16.9207530Z tests\test_docs.py ................................................EEEEE [ 36%] | |
2021-07-11T01:55:17.1172730Z EEEEEE................... [ 38%] | |
2021-07-11T01:55:38.3586304Z tests\test_facets.py .....sss.F. [ 39%] | |
2021-07-11T01:55:38.3861011Z tests\test_filters.py ..............F [ 41%] | |
2021-07-11T01:58:53.1452371Z tests\test_html.py .....FFF.........FF.................................. [ 47%] | |
2021-07-11T02:04:37.9935370Z ...........F.FFF.........................F...F.F..............FF...FFFFF [ 55%] | |
2021-07-11T02:04:38.0048155Z . [ 55%] | |
2021-07-11T02:04:58.9495095Z tests\test_internal_db.py ..... [ 55%] | |
2021-07-11T02:05:40.8303267Z tests\test_internals_database.py .......................... [ 58%] | |
2021-07-11T02:06:02.1998730Z tests\test_internals_datasette.py ........... [ 59%] | |
2021-07-11T02:06:24.7399796Z tests\test_internals_datasette_client.py .......... [ 60%] | |
2021-07-11T02:06:24.7525281Z tests\test_internals_request.py ....... [ 61%] | |
2021-07-11T02:06:24.7602866Z tests\test_internals_response.py ..... [ 62%] | |
2021-07-11T02:06:44.9494886Z tests\test_internals_urls.py .......................... [ 64%] | |
2021-07-11T02:07:07.7129844Z tests\test_messages.py .... [ 65%] | |
2021-07-11T02:14:24.7683842Z tests\test_permissions.py FFFFFFFFFFFFFFF............FF................. [ 70%] | |
2021-07-11T02:14:25.1998467Z ....................... [ 72%] | |
2021-07-11T02:15:48.9761156Z tests\test_plugins.py ........................................FF........ [ 78%] | |
2021-07-11T02:17:17.6775237Z .......................F..F.....FF...... [ 82%] | |
2021-07-11T02:17:17.7240268Z tests\test_publish_cloudrun.py ..FFFFF..FFFFF [ 84%] | |
2021-07-11T02:17:17.7637775Z tests\test_publish_heroku.py ...FF [ 84%] | |
2021-07-11T02:17:17.8624832Z tests\test_utils.py ........................................FF.......... [ 90%] | |
2021-07-11T02:17:18.3974318Z ...FFF.................................................................. [ 98%] | |
2021-07-11T02:17:18.7640576Z ..................E [100%] | |
2021-07-11T02:17:18.7641116Z | |
2021-07-11T02:17:18.7641628Z =================================== ERRORS ==================================== | |
2021-07-11T02:17:18.7642233Z ______________________ ERROR at teardown of test_insert _______________________ | |
2021-07-11T02:17:18.7642670Z | |
2021-07-11T02:17:18.7643104Z @pytest.fixture | |
2021-07-11T02:17:18.7643705Z def canned_write_client(): | |
2021-07-11T02:17:18.7644256Z with make_app_client( | |
2021-07-11T02:17:18.7644875Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.7646179Z metadata={ | |
2021-07-11T02:17:18.7646680Z "databases": { | |
2021-07-11T02:17:18.7647128Z "data": { | |
2021-07-11T02:17:18.7647627Z "queries": { | |
2021-07-11T02:17:18.7648217Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.7648760Z "add_name": { | |
2021-07-11T02:17:18.7649377Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.7649990Z "write": True, | |
2021-07-11T02:17:18.7650649Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.7651196Z }, | |
2021-07-11T02:17:18.7651713Z "add_name_specify_id": { | |
2021-07-11T02:17:18.7652399Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.7653176Z "write": True, | |
2021-07-11T02:17:18.7653794Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.7654386Z }, | |
2021-07-11T02:17:18.7654863Z "delete_name": { | |
2021-07-11T02:17:18.7655432Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.7656026Z "write": True, | |
2021-07-11T02:17:18.7656609Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.7657198Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.7657636Z }, | |
2021-07-11T02:17:18.7658120Z "update_name": { | |
2021-07-11T02:17:18.7658746Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.7659376Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.7659936Z "write": True, | |
2021-07-11T02:17:18.7660411Z }, | |
2021-07-11T02:17:18.7661388Z } | |
2021-07-11T02:17:18.7661804Z } | |
2021-07-11T02:17:18.7662208Z } | |
2021-07-11T02:17:18.7662607Z }, | |
2021-07-11T02:17:18.7662997Z ) as client: | |
2021-07-11T02:17:18.7663450Z > yield client | |
2021-07-11T02:17:18.7663770Z | |
2021-07-11T02:17:18.7664353Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.7664946Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.7665650Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.7666350Z next(self.gen) | |
2021-07-11T02:17:18.7666968Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.7667638Z yield TestClient(ds) | |
2021-07-11T02:17:18.7668356Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.7669010Z self.cleanup() | |
2021-07-11T02:17:18.7669738Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.7670482Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.7671240Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.7671945Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.7672706Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.7673493Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.7674033Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.7674361Z | |
2021-07-11T02:17:18.7674949Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpne5yrjng' | |
2021-07-11T02:17:18.7675719Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B03CE510> | |
2021-07-11T02:17:18.7676289Z | |
2021-07-11T02:17:18.7676746Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.7677250Z try: | |
2021-07-11T02:17:18.7677757Z if os.path.islink(path): | |
2021-07-11T02:17:18.7678382Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.7679108Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.7679709Z except OSError: | |
2021-07-11T02:17:18.7680318Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.7681010Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.7681554Z return | |
2021-07-11T02:17:18.7681979Z names = [] | |
2021-07-11T02:17:18.7682362Z try: | |
2021-07-11T02:17:18.7682848Z names = os.listdir(path) | |
2021-07-11T02:17:18.7683388Z except OSError: | |
2021-07-11T02:17:18.7683949Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.7684529Z for name in names: | |
2021-07-11T02:17:18.7685095Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.7685625Z try: | |
2021-07-11T02:17:18.7686098Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.7686665Z except OSError: | |
2021-07-11T02:17:18.7687143Z mode = 0 | |
2021-07-11T02:17:18.7687593Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.7688174Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.7688705Z else: | |
2021-07-11T02:17:18.7689091Z try: | |
2021-07-11T02:17:18.7689566Z > os.unlink(fullname) | |
2021-07-11T02:17:18.7690661Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpne5yrjng\\data.db' | |
2021-07-11T02:17:18.7691642Z | |
2021-07-11T02:17:18.7692765Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.7706134Z _ ERROR at teardown of test_canned_query_form_csrf_hidden_field[canned_read-False] _ | |
2021-07-11T02:17:18.7706807Z | |
2021-07-11T02:17:18.7707310Z @pytest.fixture | |
2021-07-11T02:17:18.7708003Z def canned_write_client(): | |
2021-07-11T02:17:18.7708560Z with make_app_client( | |
2021-07-11T02:17:18.7709232Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.7709827Z metadata={ | |
2021-07-11T02:17:18.7710327Z "databases": { | |
2021-07-11T02:17:18.7710865Z "data": { | |
2021-07-11T02:17:18.7711322Z "queries": { | |
2021-07-11T02:17:18.7711919Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.7712506Z "add_name": { | |
2021-07-11T02:17:18.7713079Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.7713716Z "write": True, | |
2021-07-11T02:17:18.7714367Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.7714950Z }, | |
2021-07-11T02:17:18.7715431Z "add_name_specify_id": { | |
2021-07-11T02:17:18.7716110Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.7716757Z "write": True, | |
2021-07-11T02:17:18.7717366Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.7717974Z }, | |
2021-07-11T02:17:18.7718467Z "delete_name": { | |
2021-07-11T02:17:18.7719052Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.7719670Z "write": True, | |
2021-07-11T02:17:18.7720286Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.7721490Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.7722330Z }, | |
2021-07-11T02:17:18.7722946Z "update_name": { | |
2021-07-11T02:17:18.7723781Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.7724545Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.7725219Z "write": True, | |
2021-07-11T02:17:18.7725784Z }, | |
2021-07-11T02:17:18.7726253Z } | |
2021-07-11T02:17:18.7726755Z } | |
2021-07-11T02:17:18.7727241Z } | |
2021-07-11T02:17:18.7727717Z }, | |
2021-07-11T02:17:18.7728185Z ) as client: | |
2021-07-11T02:17:18.7728728Z > yield client | |
2021-07-11T02:17:18.7729124Z | |
2021-07-11T02:17:18.7729781Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.7730974Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.7731782Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.7733044Z next(self.gen) | |
2021-07-11T02:17:18.7733680Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.7734262Z yield TestClient(ds) | |
2021-07-11T02:17:18.7734911Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.7735529Z self.cleanup() | |
2021-07-11T02:17:18.7736127Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.7736799Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.7737452Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.7738074Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.7738752Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.7739476Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.7739948Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.7740211Z | |
2021-07-11T02:17:18.7740885Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpzqkd9az3' | |
2021-07-11T02:17:18.7741548Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B06031E0> | |
2021-07-11T02:17:18.7741933Z | |
2021-07-11T02:17:18.7742348Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.7742774Z try: | |
2021-07-11T02:17:18.7743160Z if os.path.islink(path): | |
2021-07-11T02:17:18.7743747Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.7744364Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.7744896Z except OSError: | |
2021-07-11T02:17:18.7745436Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.7746018Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.7746634Z return | |
2021-07-11T02:17:18.7747022Z names = [] | |
2021-07-11T02:17:18.7747906Z try: | |
2021-07-11T02:17:18.7748380Z names = os.listdir(path) | |
2021-07-11T02:17:18.7748867Z except OSError: | |
2021-07-11T02:17:18.7749352Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.7749854Z for name in names: | |
2021-07-11T02:17:18.7750313Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.7750841Z try: | |
2021-07-11T02:17:18.7751288Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.7751734Z except OSError: | |
2021-07-11T02:17:18.7752141Z mode = 0 | |
2021-07-11T02:17:18.7752550Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.7753026Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.7753487Z else: | |
2021-07-11T02:17:18.7753846Z try: | |
2021-07-11T02:17:18.7754242Z > os.unlink(fullname) | |
2021-07-11T02:17:18.7755375Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpzqkd9az3\\data.db' | |
2021-07-11T02:17:18.7756159Z | |
2021-07-11T02:17:18.7756778Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.7757604Z _ ERROR at teardown of test_canned_query_form_csrf_hidden_field[add_name_specify_id-True] _ | |
2021-07-11T02:17:18.7758071Z | |
2021-07-11T02:17:18.7758450Z @pytest.fixture | |
2021-07-11T02:17:18.7758869Z def canned_write_client(): | |
2021-07-11T02:17:18.7759317Z with make_app_client( | |
2021-07-11T02:17:18.7759897Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.7760410Z metadata={ | |
2021-07-11T02:17:18.7761978Z "databases": { | |
2021-07-11T02:17:18.7762380Z "data": { | |
2021-07-11T02:17:18.7762742Z "queries": { | |
2021-07-11T02:17:18.7763261Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.7763717Z "add_name": { | |
2021-07-11T02:17:18.7764241Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.7764766Z "write": True, | |
2021-07-11T02:17:18.7765277Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.7765773Z }, | |
2021-07-11T02:17:18.7766202Z "add_name_specify_id": { | |
2021-07-11T02:17:18.7766752Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.7767335Z "write": True, | |
2021-07-11T02:17:18.7767905Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.7768384Z }, | |
2021-07-11T02:17:18.7768793Z "delete_name": { | |
2021-07-11T02:17:18.7769321Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.7770345Z "write": True, | |
2021-07-11T02:17:18.7770958Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.7771482Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.7771848Z }, | |
2021-07-11T02:17:18.7772254Z "update_name": { | |
2021-07-11T02:17:18.7772812Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.7773887Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.7774378Z "write": True, | |
2021-07-11T02:17:18.7774781Z }, | |
2021-07-11T02:17:18.7775095Z } | |
2021-07-11T02:17:18.7775441Z } | |
2021-07-11T02:17:18.7775747Z } | |
2021-07-11T02:17:18.7776075Z }, | |
2021-07-11T02:17:18.7776427Z ) as client: | |
2021-07-11T02:17:18.7776780Z > yield client | |
2021-07-11T02:17:18.7777035Z | |
2021-07-11T02:17:18.7777552Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.7778082Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.7778715Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.7779336Z next(self.gen) | |
2021-07-11T02:17:18.7779885Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.7780541Z yield TestClient(ds) | |
2021-07-11T02:17:18.7781179Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.7781756Z self.cleanup() | |
2021-07-11T02:17:18.7782385Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.7783142Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.7783755Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.7784420Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.7785121Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.7786889Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.7787402Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.7787670Z | |
2021-07-11T02:17:18.7788152Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpwe8vjdy5' | |
2021-07-11T02:17:18.7788851Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B046F048> | |
2021-07-11T02:17:18.7789240Z | |
2021-07-11T02:17:18.7789664Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.7790058Z try: | |
2021-07-11T02:17:18.7790543Z if os.path.islink(path): | |
2021-07-11T02:17:18.7791138Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.7791761Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.7792294Z except OSError: | |
2021-07-11T02:17:18.7792804Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.7793432Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.7793913Z return | |
2021-07-11T02:17:18.7794244Z names = [] | |
2021-07-11T02:17:18.7794605Z try: | |
2021-07-11T02:17:18.7795020Z names = os.listdir(path) | |
2021-07-11T02:17:18.7795437Z except OSError: | |
2021-07-11T02:17:18.7795955Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.7796458Z for name in names: | |
2021-07-11T02:17:18.7796912Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.7797365Z try: | |
2021-07-11T02:17:18.7798249Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.7798762Z except OSError: | |
2021-07-11T02:17:18.7799177Z mode = 0 | |
2021-07-11T02:17:18.7799553Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.7800142Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.7800668Z else: | |
2021-07-11T02:17:18.7800990Z try: | |
2021-07-11T02:17:18.7801530Z > os.unlink(fullname) | |
2021-07-11T02:17:18.7802522Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpwe8vjdy5\\data.db' | |
2021-07-11T02:17:18.7803297Z | |
2021-07-11T02:17:18.7803878Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.7804718Z _ ERROR at teardown of test_canned_query_form_csrf_hidden_field[add_name-True] _ | |
2021-07-11T02:17:18.7805160Z | |
2021-07-11T02:17:18.7805521Z @pytest.fixture | |
2021-07-11T02:17:18.7805978Z def canned_write_client(): | |
2021-07-11T02:17:18.7806439Z with make_app_client( | |
2021-07-11T02:17:18.7806971Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.7807510Z metadata={ | |
2021-07-11T02:17:18.7807924Z "databases": { | |
2021-07-11T02:17:18.7808282Z "data": { | |
2021-07-11T02:17:18.7808681Z "queries": { | |
2021-07-11T02:17:18.7809145Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.7809630Z "add_name": { | |
2021-07-11T02:17:18.7811264Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.7811751Z "write": True, | |
2021-07-11T02:17:18.7812294Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.7812797Z }, | |
2021-07-11T02:17:18.7813199Z "add_name_specify_id": { | |
2021-07-11T02:17:18.7814341Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.7814907Z "write": True, | |
2021-07-11T02:17:18.7815440Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.7815956Z }, | |
2021-07-11T02:17:18.7816374Z "delete_name": { | |
2021-07-11T02:17:18.7816869Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.7817390Z "write": True, | |
2021-07-11T02:17:18.7817905Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.7818392Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.7818798Z }, | |
2021-07-11T02:17:18.7819206Z "update_name": { | |
2021-07-11T02:17:18.7819727Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.7820328Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.7820888Z "write": True, | |
2021-07-11T02:17:18.7821250Z }, | |
2021-07-11T02:17:18.7821612Z } | |
2021-07-11T02:17:18.7821923Z } | |
2021-07-11T02:17:18.7822264Z } | |
2021-07-11T02:17:18.7822609Z }, | |
2021-07-11T02:17:18.7822937Z ) as client: | |
2021-07-11T02:17:18.7823333Z > yield client | |
2021-07-11T02:17:18.7823591Z | |
2021-07-11T02:17:18.7824509Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.7825096Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.7825729Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.7826317Z next(self.gen) | |
2021-07-11T02:17:18.7826903Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.7827520Z yield TestClient(ds) | |
2021-07-11T02:17:18.7828205Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.7828834Z self.cleanup() | |
2021-07-11T02:17:18.7829469Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.7830107Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.7830822Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.7831485Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.7832136Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.7832857Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.7833375Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.7833600Z | |
2021-07-11T02:17:18.7834115Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpi9aadbh8' | |
2021-07-11T02:17:18.7834818Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B0632F28> | |
2021-07-11T02:17:18.7835207Z | |
2021-07-11T02:17:18.7835590Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.7836023Z try: | |
2021-07-11T02:17:18.7836451Z if os.path.islink(path): | |
2021-07-11T02:17:18.7837004Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.7837667Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.7838170Z except OSError: | |
2021-07-11T02:17:18.7839742Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.7840371Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.7840866Z return | |
2021-07-11T02:17:18.7841233Z names = [] | |
2021-07-11T02:17:18.7841589Z try: | |
2021-07-11T02:17:18.7841970Z names = os.listdir(path) | |
2021-07-11T02:17:18.7842434Z except OSError: | |
2021-07-11T02:17:18.7843061Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.7843537Z for name in names: | |
2021-07-11T02:17:18.7844042Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.7844509Z try: | |
2021-07-11T02:17:18.7844947Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.7845425Z except OSError: | |
2021-07-11T02:17:18.7845797Z mode = 0 | |
2021-07-11T02:17:18.7846212Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.7846726Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.7847154Z else: | |
2021-07-11T02:17:18.7847524Z try: | |
2021-07-11T02:17:18.7847940Z > os.unlink(fullname) | |
2021-07-11T02:17:18.7848885Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpi9aadbh8\\data.db' | |
2021-07-11T02:17:18.7849658Z | |
2021-07-11T02:17:18.7850274Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.7851091Z _________ ERROR at teardown of test_insert_with_cookies_requires_csrf _________ | |
2021-07-11T02:17:18.7851498Z | |
2021-07-11T02:17:18.7851879Z @pytest.fixture | |
2021-07-11T02:17:18.7852345Z def canned_write_client(): | |
2021-07-11T02:17:18.7852764Z with make_app_client( | |
2021-07-11T02:17:18.7854063Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.7854605Z metadata={ | |
2021-07-11T02:17:18.7854976Z "databases": { | |
2021-07-11T02:17:18.7855370Z "data": { | |
2021-07-11T02:17:18.7855770Z "queries": { | |
2021-07-11T02:17:18.7856232Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.7856729Z "add_name": { | |
2021-07-11T02:17:18.7857206Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.7857730Z "write": True, | |
2021-07-11T02:17:18.7858365Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.7858835Z }, | |
2021-07-11T02:17:18.7859264Z "add_name_specify_id": { | |
2021-07-11T02:17:18.7859860Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.7860384Z "write": True, | |
2021-07-11T02:17:18.7861004Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.7861526Z }, | |
2021-07-11T02:17:18.7861903Z "delete_name": { | |
2021-07-11T02:17:18.7862440Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.7862973Z "write": True, | |
2021-07-11T02:17:18.7863456Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.7863974Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.7864385Z }, | |
2021-07-11T02:17:18.7864751Z "update_name": { | |
2021-07-11T02:17:18.7865306Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.7865905Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.7866352Z "write": True, | |
2021-07-11T02:17:18.7866755Z }, | |
2021-07-11T02:17:18.7867117Z } | |
2021-07-11T02:17:18.7867426Z } | |
2021-07-11T02:17:18.7867765Z } | |
2021-07-11T02:17:18.7868059Z }, | |
2021-07-11T02:17:18.7868420Z ) as client: | |
2021-07-11T02:17:18.7868816Z > yield client | |
2021-07-11T02:17:18.7869072Z | |
2021-07-11T02:17:18.7869640Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.7870219Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.7870869Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.7871501Z next(self.gen) | |
2021-07-11T02:17:18.7872097Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.7872669Z yield TestClient(ds) | |
2021-07-11T02:17:18.7873307Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.7873927Z self.cleanup() | |
2021-07-11T02:17:18.7874524Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.7875207Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.7875857Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.7876478Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.7877175Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.7877913Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.7878395Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.7878661Z | |
2021-07-11T02:17:18.7879164Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp_jjxtgrs' | |
2021-07-11T02:17:18.7879805Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B182B950> | |
2021-07-11T02:17:18.7880194Z | |
2021-07-11T02:17:18.7880661Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.7881097Z try: | |
2021-07-11T02:17:18.7881487Z if os.path.islink(path): | |
2021-07-11T02:17:18.7882087Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.7882747Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.7883248Z except OSError: | |
2021-07-11T02:17:18.7883803Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.7884398Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.7884878Z return | |
2021-07-11T02:17:18.7885246Z names = [] | |
2021-07-11T02:17:18.7886010Z try: | |
2021-07-11T02:17:18.7886457Z names = os.listdir(path) | |
2021-07-11T02:17:18.7886917Z except OSError: | |
2021-07-11T02:17:18.7887399Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.7887904Z for name in names: | |
2021-07-11T02:17:18.7888401Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.7888820Z try: | |
2021-07-11T02:17:18.7889269Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.7889717Z except OSError: | |
2021-07-11T02:17:18.7890126Z mode = 0 | |
2021-07-11T02:17:18.7890607Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.7891086Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.7891554Z else: | |
2021-07-11T02:17:18.7891925Z try: | |
2021-07-11T02:17:18.7892300Z > os.unlink(fullname) | |
2021-07-11T02:17:18.7893307Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp_jjxtgrs\\fixtures.db' | |
2021-07-11T02:17:18.7894095Z | |
2021-07-11T02:17:18.7895264Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.7896063Z _____________ ERROR at teardown of test_insert_no_cookies_no_csrf _____________ | |
2021-07-11T02:17:18.7896442Z | |
2021-07-11T02:17:18.7896829Z @pytest.fixture | |
2021-07-11T02:17:18.7897252Z def canned_write_client(): | |
2021-07-11T02:17:18.7897712Z with make_app_client( | |
2021-07-11T02:17:18.7898286Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.7898784Z metadata={ | |
2021-07-11T02:17:18.7899197Z "databases": { | |
2021-07-11T02:17:18.7899644Z "data": { | |
2021-07-11T02:17:18.7900047Z "queries": { | |
2021-07-11T02:17:18.7900611Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.7901069Z "add_name": { | |
2021-07-11T02:17:18.7901577Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.7902098Z "write": True, | |
2021-07-11T02:17:18.7902611Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.7903117Z }, | |
2021-07-11T02:17:18.7903555Z "add_name_specify_id": { | |
2021-07-11T02:17:18.7904103Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.7904661Z "write": True, | |
2021-07-11T02:17:18.7905228Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.7905711Z }, | |
2021-07-11T02:17:18.7906125Z "delete_name": { | |
2021-07-11T02:17:18.7906662Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.7907152Z "write": True, | |
2021-07-11T02:17:18.7907673Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.7908198Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.7908564Z }, | |
2021-07-11T02:17:18.7908982Z "update_name": { | |
2021-07-11T02:17:18.7909542Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.7910104Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.7911216Z "write": True, | |
2021-07-11T02:17:18.7911638Z }, | |
2021-07-11T02:17:18.7911964Z } | |
2021-07-11T02:17:18.7912323Z } | |
2021-07-11T02:17:18.7912631Z } | |
2021-07-11T02:17:18.7913056Z }, | |
2021-07-11T02:17:18.7913421Z ) as client: | |
2021-07-11T02:17:18.7913773Z > yield client | |
2021-07-11T02:17:18.7914033Z | |
2021-07-11T02:17:18.7914549Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.7915075Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.7915700Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.7916318Z next(self.gen) | |
2021-07-11T02:17:18.7916869Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.7917491Z yield TestClient(ds) | |
2021-07-11T02:17:18.7918127Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.7918708Z self.cleanup() | |
2021-07-11T02:17:18.7919341Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.7920011Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.7920691Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.7921360Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.7922053Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.7922734Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.7923255Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.7923519Z | |
2021-07-11T02:17:18.7924006Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmposhxucrj' | |
2021-07-11T02:17:18.7924706Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B048AF28> | |
2021-07-11T02:17:18.7925097Z | |
2021-07-11T02:17:18.7925521Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.7925919Z try: | |
2021-07-11T02:17:18.7926415Z if os.path.islink(path): | |
2021-07-11T02:17:18.7926973Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.7927637Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.7928189Z except OSError: | |
2021-07-11T02:17:18.7928699Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.7929325Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.7929804Z return | |
2021-07-11T02:17:18.7930134Z names = [] | |
2021-07-11T02:17:18.7930539Z try: | |
2021-07-11T02:17:18.7930958Z names = os.listdir(path) | |
2021-07-11T02:17:18.7932525Z except OSError: | |
2021-07-11T02:17:18.7933058Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.7933524Z for name in names: | |
2021-07-11T02:17:18.7934023Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.7934478Z try: | |
2021-07-11T02:17:18.7934896Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.7935381Z except OSError: | |
2021-07-11T02:17:18.7935792Z mode = 0 | |
2021-07-11T02:17:18.7936167Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.7936678Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.7937140Z else: | |
2021-07-11T02:17:18.7937463Z try: | |
2021-07-11T02:17:18.7937875Z > os.unlink(fullname) | |
2021-07-11T02:17:18.7938857Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmposhxucrj\\data.db' | |
2021-07-11T02:17:18.7939593Z | |
2021-07-11T02:17:18.7940201Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.7941031Z ______________ ERROR at teardown of test_custom_success_message _______________ | |
2021-07-11T02:17:18.7941411Z | |
2021-07-11T02:17:18.7941753Z @pytest.fixture | |
2021-07-11T02:17:18.7942215Z def canned_write_client(): | |
2021-07-11T02:17:18.7942676Z with make_app_client( | |
2021-07-11T02:17:18.7943295Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.7943867Z metadata={ | |
2021-07-11T02:17:18.7944238Z "databases": { | |
2021-07-11T02:17:18.7944664Z "data": { | |
2021-07-11T02:17:18.7945064Z "queries": { | |
2021-07-11T02:17:18.7945527Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.7946016Z "add_name": { | |
2021-07-11T02:17:18.7946528Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.7947011Z "write": True, | |
2021-07-11T02:17:18.7947551Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.7948045Z }, | |
2021-07-11T02:17:18.7948438Z "add_name_specify_id": { | |
2021-07-11T02:17:18.7949030Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.7949595Z "write": True, | |
2021-07-11T02:17:18.7950118Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.7950683Z }, | |
2021-07-11T02:17:18.7951094Z "delete_name": { | |
2021-07-11T02:17:18.7951589Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.7952115Z "write": True, | |
2021-07-11T02:17:18.7952637Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.7953122Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.7953523Z }, | |
2021-07-11T02:17:18.7953889Z "update_name": { | |
2021-07-11T02:17:18.7954528Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.7955133Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.7955590Z "write": True, | |
2021-07-11T02:17:18.7955992Z }, | |
2021-07-11T02:17:18.7956346Z } | |
2021-07-11T02:17:18.7956654Z } | |
2021-07-11T02:17:18.7956996Z } | |
2021-07-11T02:17:18.7957346Z }, | |
2021-07-11T02:17:18.7958224Z ) as client: | |
2021-07-11T02:17:18.7958649Z > yield client | |
2021-07-11T02:17:18.7958908Z | |
2021-07-11T02:17:18.7959392Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.7959953Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.7960633Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.7961223Z next(self.gen) | |
2021-07-11T02:17:18.7961823Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.7962436Z yield TestClient(ds) | |
2021-07-11T02:17:18.7963036Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.7963661Z self.cleanup() | |
2021-07-11T02:17:18.7964294Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.7964919Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.7965571Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.7966235Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.7966887Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.7967608Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.7968083Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.7968352Z | |
2021-07-11T02:17:18.7968868Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpk1uqybu0' | |
2021-07-11T02:17:18.7969576Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B18CEEA0> | |
2021-07-11T02:17:18.7970211Z | |
2021-07-11T02:17:18.7970647Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.7971084Z try: | |
2021-07-11T02:17:18.7971468Z if os.path.islink(path): | |
2021-07-11T02:17:18.7972064Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.7972725Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.7973226Z except OSError: | |
2021-07-11T02:17:18.7973776Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.7974405Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.7974842Z return | |
2021-07-11T02:17:18.7975207Z names = [] | |
2021-07-11T02:17:18.7975558Z try: | |
2021-07-11T02:17:18.7975930Z names = os.listdir(path) | |
2021-07-11T02:17:18.7976391Z except OSError: | |
2021-07-11T02:17:18.7976868Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.7977373Z for name in names: | |
2021-07-11T02:17:18.7977873Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.7978287Z try: | |
2021-07-11T02:17:18.7978724Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.7979209Z except OSError: | |
2021-07-11T02:17:18.7979578Z mode = 0 | |
2021-07-11T02:17:18.7979989Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.7980546Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.7980970Z else: | |
2021-07-11T02:17:18.7981326Z try: | |
2021-07-11T02:17:18.7981695Z > os.unlink(fullname) | |
2021-07-11T02:17:18.7982675Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpk1uqybu0\\data.db' | |
2021-07-11T02:17:18.7984693Z | |
2021-07-11T02:17:18.7985319Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.7986035Z ___________________ ERROR at teardown of test_insert_error ____________________ | |
2021-07-11T02:17:18.7986385Z | |
2021-07-11T02:17:18.7986773Z @pytest.fixture | |
2021-07-11T02:17:18.7987195Z def canned_write_client(): | |
2021-07-11T02:17:18.7987651Z with make_app_client( | |
2021-07-11T02:17:18.7988226Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.7988732Z metadata={ | |
2021-07-11T02:17:18.7989146Z "databases": { | |
2021-07-11T02:17:18.7989538Z "data": { | |
2021-07-11T02:17:18.7989899Z "queries": { | |
2021-07-11T02:17:18.7990407Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.7990954Z "add_name": { | |
2021-07-11T02:17:18.7991437Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.7991960Z "write": True, | |
2021-07-11T02:17:18.7992524Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.7992980Z }, | |
2021-07-11T02:17:18.7993412Z "add_name_specify_id": { | |
2021-07-11T02:17:18.7994005Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.7994524Z "write": True, | |
2021-07-11T02:17:18.7995096Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.7995607Z }, | |
2021-07-11T02:17:18.7995976Z "delete_name": { | |
2021-07-11T02:17:18.7996513Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.7997050Z "write": True, | |
2021-07-11T02:17:18.7997531Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.7998118Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.7998504Z }, | |
2021-07-11T02:17:18.7998911Z "update_name": { | |
2021-07-11T02:17:18.7999473Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.8000034Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.8000578Z "write": True, | |
2021-07-11T02:17:18.8000979Z }, | |
2021-07-11T02:17:18.8001296Z } | |
2021-07-11T02:17:18.8001644Z } | |
2021-07-11T02:17:18.8001990Z } | |
2021-07-11T02:17:18.8002288Z }, | |
2021-07-11T02:17:18.8002646Z ) as client: | |
2021-07-11T02:17:18.8003003Z > yield client | |
2021-07-11T02:17:18.8003256Z | |
2021-07-11T02:17:18.8003778Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.8004346Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8004933Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.8005552Z next(self.gen) | |
2021-07-11T02:17:18.8006145Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8006711Z yield TestClient(ds) | |
2021-07-11T02:17:18.8007349Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8007973Z self.cleanup() | |
2021-07-11T02:17:18.8008572Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8009244Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8009861Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8010656Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8011354Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8012051Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8012569Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8012840Z | |
2021-07-11T02:17:18.8013359Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpdx06adcm' | |
2021-07-11T02:17:18.8014018Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B04BBD90> | |
2021-07-11T02:17:18.8014413Z | |
2021-07-11T02:17:18.8014831Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8015223Z try: | |
2021-07-11T02:17:18.8015650Z if os.path.islink(path): | |
2021-07-11T02:17:18.8016247Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8016864Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8017411Z except OSError: | |
2021-07-11T02:17:18.8017965Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8018552Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8019031Z return | |
2021-07-11T02:17:18.8019396Z names = [] | |
2021-07-11T02:17:18.8019712Z try: | |
2021-07-11T02:17:18.8020126Z names = os.listdir(path) | |
2021-07-11T02:17:18.8020598Z except OSError: | |
2021-07-11T02:17:18.8021115Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8021622Z for name in names: | |
2021-07-11T02:17:18.8022080Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8022537Z try: | |
2021-07-11T02:17:18.8022982Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8023424Z except OSError: | |
2021-07-11T02:17:18.8023844Z mode = 0 | |
2021-07-11T02:17:18.8024261Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8024733Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8025203Z else: | |
2021-07-11T02:17:18.8025525Z try: | |
2021-07-11T02:17:18.8025940Z > os.unlink(fullname) | |
2021-07-11T02:17:18.8026974Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpdx06adcm\\data.db' | |
2021-07-11T02:17:18.8027743Z | |
2021-07-11T02:17:18.8028323Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.8029145Z ---------------------------- Captured stderr call ----------------------------- | |
2021-07-11T02:17:18.8030328Z UNIQUE constraint failed: names.rowid | |
2021-07-11T02:17:18.8030912Z UNIQUE constraint failed: names.rowid | |
2021-07-11T02:17:18.8031504Z ___________________ ERROR at teardown of test_custom_params ___________________ | |
2021-07-11T02:17:18.8031857Z | |
2021-07-11T02:17:18.8032203Z @pytest.fixture | |
2021-07-11T02:17:18.8032694Z def canned_write_client(): | |
2021-07-11T02:17:18.8033159Z with make_app_client( | |
2021-07-11T02:17:18.8033701Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.8034245Z metadata={ | |
2021-07-11T02:17:18.8034663Z "databases": { | |
2021-07-11T02:17:18.8035027Z "data": { | |
2021-07-11T02:17:18.8035433Z "queries": { | |
2021-07-11T02:17:18.8035937Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.8036390Z "add_name": { | |
2021-07-11T02:17:18.8036923Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.8037451Z "write": True, | |
2021-07-11T02:17:18.8037960Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.8038455Z }, | |
2021-07-11T02:17:18.8038845Z "add_name_specify_id": { | |
2021-07-11T02:17:18.8039509Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.8040085Z "write": True, | |
2021-07-11T02:17:18.8040654Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.8041170Z }, | |
2021-07-11T02:17:18.8041582Z "delete_name": { | |
2021-07-11T02:17:18.8042079Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.8042606Z "write": True, | |
2021-07-11T02:17:18.8043123Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.8043608Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.8044011Z }, | |
2021-07-11T02:17:18.8044430Z "update_name": { | |
2021-07-11T02:17:18.8044980Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.8045580Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.8046065Z "write": True, | |
2021-07-11T02:17:18.8046421Z }, | |
2021-07-11T02:17:18.8046780Z } | |
2021-07-11T02:17:18.8047129Z } | |
2021-07-11T02:17:18.8047429Z } | |
2021-07-11T02:17:18.8047760Z }, | |
2021-07-11T02:17:18.8048078Z ) as client: | |
2021-07-11T02:17:18.8048468Z > yield client | |
2021-07-11T02:17:18.8048726Z | |
2021-07-11T02:17:18.8049243Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.8049773Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8050405Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.8051071Z next(self.gen) | |
2021-07-11T02:17:18.8051630Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8052244Z yield TestClient(ds) | |
2021-07-11T02:17:18.8052928Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8053551Z self.cleanup() | |
2021-07-11T02:17:18.8054186Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8054818Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8055475Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8056141Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8056793Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8057510Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8058023Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8058283Z | |
2021-07-11T02:17:18.8058759Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp3awq3t9_' | |
2021-07-11T02:17:18.8059446Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B0558158> | |
2021-07-11T02:17:18.8059830Z | |
2021-07-11T02:17:18.8060216Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8060702Z try: | |
2021-07-11T02:17:18.8061135Z if os.path.islink(path): | |
2021-07-11T02:17:18.8061693Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8062365Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8062906Z except OSError: | |
2021-07-11T02:17:18.8063416Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8064052Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8064490Z return | |
2021-07-11T02:17:18.8064851Z names = [] | |
2021-07-11T02:17:18.8065200Z try: | |
2021-07-11T02:17:18.8065572Z names = os.listdir(path) | |
2021-07-11T02:17:18.8066098Z except OSError: | |
2021-07-11T02:17:18.8066615Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8067083Z for name in names: | |
2021-07-11T02:17:18.8067587Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8068042Z try: | |
2021-07-11T02:17:18.8068676Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8069165Z except OSError: | |
2021-07-11T02:17:18.8069542Z mode = 0 | |
2021-07-11T02:17:18.8069960Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8070533Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8070965Z else: | |
2021-07-11T02:17:18.8071330Z try: | |
2021-07-11T02:17:18.8071750Z > os.unlink(fullname) | |
2021-07-11T02:17:18.8072697Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp3awq3t9_\\data.db' | |
2021-07-11T02:17:18.8073464Z | |
2021-07-11T02:17:18.8074071Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.8074822Z ____________________ ERROR at teardown of test_vary_header ____________________ | |
2021-07-11T02:17:18.8075131Z | |
2021-07-11T02:17:18.8076647Z @pytest.fixture | |
2021-07-11T02:17:18.8077144Z def canned_write_client(): | |
2021-07-11T02:17:18.8077565Z with make_app_client( | |
2021-07-11T02:17:18.8078144Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.8078689Z metadata={ | |
2021-07-11T02:17:18.8079068Z "databases": { | |
2021-07-11T02:17:18.8079476Z "data": { | |
2021-07-11T02:17:18.8079885Z "queries": { | |
2021-07-11T02:17:18.8080357Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.8080913Z "add_name": { | |
2021-07-11T02:17:18.8081400Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.8081929Z "write": True, | |
2021-07-11T02:17:18.8082575Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.8083044Z }, | |
2021-07-11T02:17:18.8083478Z "add_name_specify_id": { | |
2021-07-11T02:17:18.8084078Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.8084602Z "write": True, | |
2021-07-11T02:17:18.8085174Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.8085694Z }, | |
2021-07-11T02:17:18.8086069Z "delete_name": { | |
2021-07-11T02:17:18.8086608Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.8087140Z "write": True, | |
2021-07-11T02:17:18.8087629Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.8088157Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.8088566Z }, | |
2021-07-11T02:17:18.8088944Z "update_name": { | |
2021-07-11T02:17:18.8089507Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.8090113Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.8090894Z "write": True, | |
2021-07-11T02:17:18.8091333Z }, | |
2021-07-11T02:17:18.8091702Z } | |
2021-07-11T02:17:18.8092014Z } | |
2021-07-11T02:17:18.8092360Z } | |
2021-07-11T02:17:18.8092658Z }, | |
2021-07-11T02:17:18.8093021Z ) as client: | |
2021-07-11T02:17:18.8093415Z > yield client | |
2021-07-11T02:17:18.8093769Z | |
2021-07-11T02:17:18.8094252Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.8094824Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8095415Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.8096035Z next(self.gen) | |
2021-07-11T02:17:18.8104505Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8105196Z yield TestClient(ds) | |
2021-07-11T02:17:18.8105862Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8106490Z self.cleanup() | |
2021-07-11T02:17:18.8107093Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8107777Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8108436Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8109064Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8109780Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8110616Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8111098Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8111366Z | |
2021-07-11T02:17:18.8111888Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpnvqz0ib1' | |
2021-07-11T02:17:18.8112547Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B1742F28> | |
2021-07-11T02:17:18.8112944Z | |
2021-07-11T02:17:18.8113369Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8113806Z try: | |
2021-07-11T02:17:18.8114191Z if os.path.islink(path): | |
2021-07-11T02:17:18.8114791Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8115456Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8115951Z except OSError: | |
2021-07-11T02:17:18.8116511Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8117098Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8118290Z return | |
2021-07-11T02:17:18.8118683Z names = [] | |
2021-07-11T02:17:18.8119001Z try: | |
2021-07-11T02:17:18.8119419Z names = os.listdir(path) | |
2021-07-11T02:17:18.8119887Z except OSError: | |
2021-07-11T02:17:18.8120376Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8120960Z for name in names: | |
2021-07-11T02:17:18.8121470Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8121888Z try: | |
2021-07-11T02:17:18.8122343Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8122797Z except OSError: | |
2021-07-11T02:17:18.8123212Z mode = 0 | |
2021-07-11T02:17:18.8123635Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8124118Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8124602Z else: | |
2021-07-11T02:17:18.8124970Z try: | |
2021-07-11T02:17:18.8125351Z > os.unlink(fullname) | |
2021-07-11T02:17:18.8126340Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpnvqz0ib1\\data.db' | |
2021-07-11T02:17:18.8127106Z | |
2021-07-11T02:17:18.8127683Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.8128432Z __________________ ERROR at teardown of test_json_post_body ___________________ | |
2021-07-11T02:17:18.8128783Z | |
2021-07-11T02:17:18.8129169Z @pytest.fixture | |
2021-07-11T02:17:18.8129592Z def canned_write_client(): | |
2021-07-11T02:17:18.8130054Z with make_app_client( | |
2021-07-11T02:17:18.8130851Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.8131374Z metadata={ | |
2021-07-11T02:17:18.8131900Z "databases": { | |
2021-07-11T02:17:18.8132263Z "data": { | |
2021-07-11T02:17:18.8132668Z "queries": { | |
2021-07-11T02:17:18.8133185Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.8133642Z "add_name": { | |
2021-07-11T02:17:18.8134160Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.8134692Z "write": True, | |
2021-07-11T02:17:18.8135198Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.8135704Z }, | |
2021-07-11T02:17:18.8136138Z "add_name_specify_id": { | |
2021-07-11T02:17:18.8136685Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.8137244Z "write": True, | |
2021-07-11T02:17:18.8137819Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.8138304Z }, | |
2021-07-11T02:17:18.8138721Z "delete_name": { | |
2021-07-11T02:17:18.8139268Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.8139752Z "write": True, | |
2021-07-11T02:17:18.8140269Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.8140852Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.8141219Z }, | |
2021-07-11T02:17:18.8141629Z "update_name": { | |
2021-07-11T02:17:18.8142188Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.8142753Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.8143248Z "write": True, | |
2021-07-11T02:17:18.8143650Z }, | |
2021-07-11T02:17:18.8143969Z } | |
2021-07-11T02:17:18.8144331Z } | |
2021-07-11T02:17:18.8144729Z } | |
2021-07-11T02:17:18.8145076Z }, | |
2021-07-11T02:17:18.8145440Z ) as client: | |
2021-07-11T02:17:18.8145792Z > yield client | |
2021-07-11T02:17:18.8146057Z | |
2021-07-11T02:17:18.8146578Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.8147108Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8147746Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.8148371Z next(self.gen) | |
2021-07-11T02:17:18.8148928Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8149536Z yield TestClient(ds) | |
2021-07-11T02:17:18.8150176Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8150819Z self.cleanup() | |
2021-07-11T02:17:18.8151460Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8152147Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8152764Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8153429Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8154121Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8154796Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8155307Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8155574Z | |
2021-07-11T02:17:18.8156047Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp147qmo1d' | |
2021-07-11T02:17:18.8156737Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B1740E18> | |
2021-07-11T02:17:18.8157131Z | |
2021-07-11T02:17:18.8157557Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8158020Z try: | |
2021-07-11T02:17:18.8158452Z if os.path.islink(path): | |
2021-07-11T02:17:18.8159011Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8159678Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8160219Z except OSError: | |
2021-07-11T02:17:18.8160776Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8161410Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8161897Z return | |
2021-07-11T02:17:18.8162224Z names = [] | |
2021-07-11T02:17:18.8162579Z try: | |
2021-07-11T02:17:18.8162999Z names = os.listdir(path) | |
2021-07-11T02:17:18.8163426Z except OSError: | |
2021-07-11T02:17:18.8163948Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8164414Z for name in names: | |
2021-07-11T02:17:18.8164916Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8165379Z try: | |
2021-07-11T02:17:18.8165783Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8166266Z except OSError: | |
2021-07-11T02:17:18.8166679Z mode = 0 | |
2021-07-11T02:17:18.8167061Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8167573Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8168042Z else: | |
2021-07-11T02:17:18.8168366Z try: | |
2021-07-11T02:17:18.8168779Z > os.unlink(fullname) | |
2021-07-11T02:17:18.8169756Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp147qmo1d\\data.db' | |
2021-07-11T02:17:18.8170525Z | |
2021-07-11T02:17:18.8171149Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.8172013Z __ ERROR at teardown of test_json_response[None-name=NameGoesHere-?_json=1] ___ | |
2021-07-11T02:17:18.8172485Z | |
2021-07-11T02:17:18.8172830Z @pytest.fixture | |
2021-07-11T02:17:18.8173295Z def canned_write_client(): | |
2021-07-11T02:17:18.8174033Z with make_app_client( | |
2021-07-11T02:17:18.8174999Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.8175549Z metadata={ | |
2021-07-11T02:17:18.8175932Z "databases": { | |
2021-07-11T02:17:18.8176330Z "data": { | |
2021-07-11T02:17:18.8176741Z "queries": { | |
2021-07-11T02:17:18.8177208Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.8177715Z "add_name": { | |
2021-07-11T02:17:18.8178236Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.8178717Z "write": True, | |
2021-07-11T02:17:18.8179274Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.8179783Z }, | |
2021-07-11T02:17:18.8180178Z "add_name_specify_id": { | |
2021-07-11T02:17:18.8180827Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.8181382Z "write": True, | |
2021-07-11T02:17:18.8181906Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.8182417Z }, | |
2021-07-11T02:17:18.8182832Z "delete_name": { | |
2021-07-11T02:17:18.8183331Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.8183861Z "write": True, | |
2021-07-11T02:17:18.8184395Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.8184876Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.8185287Z }, | |
2021-07-11T02:17:18.8185716Z "update_name": { | |
2021-07-11T02:17:18.8186289Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.8186891Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.8187340Z "write": True, | |
2021-07-11T02:17:18.8187746Z }, | |
2021-07-11T02:17:18.8188107Z } | |
2021-07-11T02:17:18.8188421Z } | |
2021-07-11T02:17:18.8188769Z } | |
2021-07-11T02:17:18.8189106Z }, | |
2021-07-11T02:17:18.8189432Z ) as client: | |
2021-07-11T02:17:18.8189835Z > yield client | |
2021-07-11T02:17:18.8190094Z | |
2021-07-11T02:17:18.8190618Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.8191188Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8191816Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.8192397Z next(self.gen) | |
2021-07-11T02:17:18.8192990Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8193604Z yield TestClient(ds) | |
2021-07-11T02:17:18.8194206Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8194832Z self.cleanup() | |
2021-07-11T02:17:18.8195464Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8196097Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8196753Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8197424Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8198088Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8198817Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8199307Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8199579Z | |
2021-07-11T02:17:18.8200099Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpr6vh9fr2' | |
2021-07-11T02:17:18.8200898Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B1740158> | |
2021-07-11T02:17:18.8201289Z | |
2021-07-11T02:17:18.8201680Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8202115Z try: | |
2021-07-11T02:17:18.8202507Z if os.path.islink(path): | |
2021-07-11T02:17:18.8203102Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8203768Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8204262Z except OSError: | |
2021-07-11T02:17:18.8204810Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8205445Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8205893Z return | |
2021-07-11T02:17:18.8206263Z names = [] | |
2021-07-11T02:17:18.8206616Z try: | |
2021-07-11T02:17:18.8207000Z names = os.listdir(path) | |
2021-07-11T02:17:18.8207458Z except OSError: | |
2021-07-11T02:17:18.8207950Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8208457Z for name in names: | |
2021-07-11T02:17:18.8208954Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8209369Z try: | |
2021-07-11T02:17:18.8209810Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8210301Z except OSError: | |
2021-07-11T02:17:18.8212576Z mode = 0 | |
2021-07-11T02:17:18.8213019Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8213554Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8213977Z else: | |
2021-07-11T02:17:18.8214348Z try: | |
2021-07-11T02:17:18.8214732Z > os.unlink(fullname) | |
2021-07-11T02:17:18.8215725Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpr6vh9fr2\\data.db' | |
2021-07-11T02:17:18.8216629Z | |
2021-07-11T02:17:18.8217254Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.8218140Z __ ERROR at teardown of test_json_response[headers1-name=NameGoesHere-None] ___ | |
2021-07-11T02:17:18.8218656Z | |
2021-07-11T02:17:18.8219045Z @pytest.fixture | |
2021-07-11T02:17:18.8219469Z def canned_write_client(): | |
2021-07-11T02:17:18.8219926Z with make_app_client( | |
2021-07-11T02:17:18.8220583Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.8221094Z metadata={ | |
2021-07-11T02:17:18.8221509Z "databases": { | |
2021-07-11T02:17:18.8221924Z "data": { | |
2021-07-11T02:17:18.8222286Z "queries": { | |
2021-07-11T02:17:18.8222799Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.8223308Z "add_name": { | |
2021-07-11T02:17:18.8223781Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.8224306Z "write": True, | |
2021-07-11T02:17:18.8224858Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.8225318Z }, | |
2021-07-11T02:17:18.8225758Z "add_name_specify_id": { | |
2021-07-11T02:17:18.8226344Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.8226868Z "write": True, | |
2021-07-11T02:17:18.8227430Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.8227955Z }, | |
2021-07-11T02:17:18.8228322Z "delete_name": { | |
2021-07-11T02:17:18.8228859Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.8229353Z "write": True, | |
2021-07-11T02:17:18.8229948Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.8230545Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.8230915Z }, | |
2021-07-11T02:17:18.8231318Z "update_name": { | |
2021-07-11T02:17:18.8231877Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.8232442Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.8232936Z "write": True, | |
2021-07-11T02:17:18.8233335Z }, | |
2021-07-11T02:17:18.8233657Z } | |
2021-07-11T02:17:18.8234011Z } | |
2021-07-11T02:17:18.8234355Z } | |
2021-07-11T02:17:18.8234659Z }, | |
2021-07-11T02:17:18.8235026Z ) as client: | |
2021-07-11T02:17:18.8235384Z > yield client | |
2021-07-11T02:17:18.8235647Z | |
2021-07-11T02:17:18.8236167Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.8236741Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8237337Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.8237959Z next(self.gen) | |
2021-07-11T02:17:18.8238552Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8239117Z yield TestClient(ds) | |
2021-07-11T02:17:18.8239766Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8240382Z self.cleanup() | |
2021-07-11T02:17:18.8241037Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8241710Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8242326Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8243073Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8243771Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8244451Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8244992Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8245258Z | |
2021-07-11T02:17:18.8245798Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpgjeubrr0' | |
2021-07-11T02:17:18.8246459Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B1768BF8> | |
2021-07-11T02:17:18.8246846Z | |
2021-07-11T02:17:18.8247280Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8247681Z try: | |
2021-07-11T02:17:18.8248111Z if os.path.islink(path): | |
2021-07-11T02:17:18.8248710Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8249334Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8249881Z except OSError: | |
2021-07-11T02:17:18.8250426Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8251066Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8251546Z return | |
2021-07-11T02:17:18.8251915Z names = [] | |
2021-07-11T02:17:18.8252230Z try: | |
2021-07-11T02:17:18.8252646Z names = os.listdir(path) | |
2021-07-11T02:17:18.8253069Z except OSError: | |
2021-07-11T02:17:18.8253598Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8254111Z for name in names: | |
2021-07-11T02:17:18.8254575Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8255043Z try: | |
2021-07-11T02:17:18.8255491Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8255936Z except OSError: | |
2021-07-11T02:17:18.8256350Z mode = 0 | |
2021-07-11T02:17:18.8256773Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8257252Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8257724Z else: | |
2021-07-11T02:17:18.8258048Z try: | |
2021-07-11T02:17:18.8258534Z > os.unlink(fullname) | |
2021-07-11T02:17:18.8259538Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpgjeubrr0\\data.db' | |
2021-07-11T02:17:18.8261130Z | |
2021-07-11T02:17:18.8261711Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.8262581Z _ ERROR at teardown of test_json_response[None-name=NameGoesHere&_json=1-None] _ | |
2021-07-11T02:17:18.8263058Z | |
2021-07-11T02:17:18.8263402Z @pytest.fixture | |
2021-07-11T02:17:18.8263866Z def canned_write_client(): | |
2021-07-11T02:17:18.8264317Z with make_app_client( | |
2021-07-11T02:17:18.8264858Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.8265407Z metadata={ | |
2021-07-11T02:17:18.8265824Z "databases": { | |
2021-07-11T02:17:18.8266186Z "data": { | |
2021-07-11T02:17:18.8266585Z "queries": { | |
2021-07-11T02:17:18.8267085Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.8267542Z "add_name": { | |
2021-07-11T02:17:18.8268057Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.8268582Z "write": True, | |
2021-07-11T02:17:18.8269086Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.8269581Z }, | |
2021-07-11T02:17:18.8270105Z "add_name_specify_id": { | |
2021-07-11T02:17:18.8270770Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.8271898Z "write": True, | |
2021-07-11T02:17:18.8272510Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.8273046Z }, | |
2021-07-11T02:17:18.8273478Z "delete_name": { | |
2021-07-11T02:17:18.8274054Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.8274598Z "write": True, | |
2021-07-11T02:17:18.8275081Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.8275606Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.8276037Z }, | |
2021-07-11T02:17:18.8276422Z "update_name": { | |
2021-07-11T02:17:18.8277001Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.8277617Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.8278076Z "write": True, | |
2021-07-11T02:17:18.8278487Z }, | |
2021-07-11T02:17:18.8278808Z } | |
2021-07-11T02:17:18.8279170Z } | |
2021-07-11T02:17:18.8279515Z } | |
2021-07-11T02:17:18.8279811Z }, | |
2021-07-11T02:17:18.8280187Z ) as client: | |
2021-07-11T02:17:18.8280638Z > yield client | |
2021-07-11T02:17:18.8280855Z | |
2021-07-11T02:17:18.8281392Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.8281966Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8282572Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.8312984Z next(self.gen) | |
2021-07-11T02:17:18.8313698Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8314319Z yield TestClient(ds) | |
2021-07-11T02:17:18.8314953Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8315563Z self.cleanup() | |
2021-07-11T02:17:18.8316298Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8316944Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8317573Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8318181Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8318838Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8319519Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8319974Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8320222Z | |
2021-07-11T02:17:18.8320738Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp2w_pwlr4' | |
2021-07-11T02:17:18.8321390Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B1733378> | |
2021-07-11T02:17:18.8321743Z | |
2021-07-11T02:17:18.8322135Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8322533Z try: | |
2021-07-11T02:17:18.8322903Z if os.path.islink(path): | |
2021-07-11T02:17:18.8323457Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8324069Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8324535Z except OSError: | |
2021-07-11T02:17:18.8325047Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8325630Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8326054Z return | |
2021-07-11T02:17:18.8326377Z names = [] | |
2021-07-11T02:17:18.8326673Z try: | |
2021-07-11T02:17:18.8327040Z names = os.listdir(path) | |
2021-07-11T02:17:18.8327446Z except OSError: | |
2021-07-11T02:17:18.8327902Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8328362Z for name in names: | |
2021-07-11T02:17:18.8328893Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8329290Z try: | |
2021-07-11T02:17:18.8329691Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8330133Z except OSError: | |
2021-07-11T02:17:18.8330483Z mode = 0 | |
2021-07-11T02:17:18.8330893Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8331351Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8331778Z else: | |
2021-07-11T02:17:18.8332102Z try: | |
2021-07-11T02:17:18.8332484Z > os.unlink(fullname) | |
2021-07-11T02:17:18.8333413Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp2w_pwlr4\\data.db' | |
2021-07-11T02:17:18.8334147Z | |
2021-07-11T02:17:18.8334726Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.8335535Z _ ERROR at teardown of test_json_response[None-{"name": "NameGoesHere", "_json": 1}-None] _ | |
2021-07-11T02:17:18.8335982Z | |
2021-07-11T02:17:18.8336330Z @pytest.fixture | |
2021-07-11T02:17:18.8336731Z def canned_write_client(): | |
2021-07-11T02:17:18.8337151Z with make_app_client( | |
2021-07-11T02:17:18.8337685Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.8338170Z metadata={ | |
2021-07-11T02:17:18.8338545Z "databases": { | |
2021-07-11T02:17:18.8338906Z "data": { | |
2021-07-11T02:17:18.8339246Z "queries": { | |
2021-07-11T02:17:18.8339708Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.8340164Z "add_name": { | |
2021-07-11T02:17:18.8340639Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.8341126Z "write": True, | |
2021-07-11T02:17:18.8341633Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.8342074Z }, | |
2021-07-11T02:17:18.8342518Z "add_name_specify_id": { | |
2021-07-11T02:17:18.8343050Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.8343575Z "write": True, | |
2021-07-11T02:17:18.8344100Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.8344552Z }, | |
2021-07-11T02:17:18.8344922Z "delete_name": { | |
2021-07-11T02:17:18.8345418Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.8345885Z "write": True, | |
2021-07-11T02:17:18.8346357Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.8346828Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.8347175Z }, | |
2021-07-11T02:17:18.8347545Z "update_name": { | |
2021-07-11T02:17:18.8348061Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.8348601Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.8349047Z "write": True, | |
2021-07-11T02:17:18.8349407Z }, | |
2021-07-11T02:17:18.8349705Z } | |
2021-07-11T02:17:18.8350006Z } | |
2021-07-11T02:17:18.8350295Z } | |
2021-07-11T02:17:18.8350590Z }, | |
2021-07-11T02:17:18.8350886Z ) as client: | |
2021-07-11T02:17:18.8351208Z > yield client | |
2021-07-11T02:17:18.8351437Z | |
2021-07-11T02:17:18.8351915Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.8352436Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8353053Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.8353621Z next(self.gen) | |
2021-07-11T02:17:18.8354160Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8354704Z yield TestClient(ds) | |
2021-07-11T02:17:18.8355294Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8355852Z self.cleanup() | |
2021-07-11T02:17:18.8356436Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8357057Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8357648Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8358255Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8358898Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8359547Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8360015Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8360254Z | |
2021-07-11T02:17:18.8360742Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmph35n7zi_' | |
2021-07-11T02:17:18.8361370Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B192FEA0> | |
2021-07-11T02:17:18.8361740Z | |
2021-07-11T02:17:18.8362113Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8362485Z try: | |
2021-07-11T02:17:18.8362863Z if os.path.islink(path): | |
2021-07-11T02:17:18.8363412Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8364002Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8364489Z except OSError: | |
2021-07-11T02:17:18.8364989Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8365544Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8365975Z return | |
2021-07-11T02:17:18.8366277Z names = [] | |
2021-07-11T02:17:18.8366582Z try: | |
2021-07-11T02:17:18.8366945Z names = os.listdir(path) | |
2021-07-11T02:17:18.8367389Z except OSError: | |
2021-07-11T02:17:18.8367853Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8368301Z for name in names: | |
2021-07-11T02:17:18.8368733Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8369133Z try: | |
2021-07-11T02:17:18.8369524Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8369941Z except OSError: | |
2021-07-11T02:17:18.8370300Z mode = 0 | |
2021-07-11T02:17:18.8370675Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8371137Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8371547Z else: | |
2021-07-11T02:17:18.8371844Z try: | |
2021-07-11T02:17:18.8372205Z > os.unlink(fullname) | |
2021-07-11T02:17:18.8373140Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmph35n7zi_\\data.db' | |
2021-07-11T02:17:18.8373874Z | |
2021-07-11T02:17:18.8374415Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.8375195Z _____ ERROR at teardown of test_canned_query_permissions_on_database_page _____ | |
2021-07-11T02:17:18.8375602Z | |
2021-07-11T02:17:18.8375921Z @pytest.fixture | |
2021-07-11T02:17:18.8376330Z def canned_write_client(): | |
2021-07-11T02:17:18.8376736Z with make_app_client( | |
2021-07-11T02:17:18.8377245Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.8377729Z metadata={ | |
2021-07-11T02:17:18.8378089Z "databases": { | |
2021-07-11T02:17:18.8378424Z "data": { | |
2021-07-11T02:17:18.8378770Z "queries": { | |
2021-07-11T02:17:18.8379282Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.8379714Z "add_name": { | |
2021-07-11T02:17:18.8380180Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.8380670Z "write": True, | |
2021-07-11T02:17:18.8381164Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.8381608Z }, | |
2021-07-11T02:17:18.8381968Z "add_name_specify_id": { | |
2021-07-11T02:17:18.8382505Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.8383006Z "write": True, | |
2021-07-11T02:17:18.8383500Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.8383967Z }, | |
2021-07-11T02:17:18.8384329Z "delete_name": { | |
2021-07-11T02:17:18.8384801Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.8385272Z "write": True, | |
2021-07-11T02:17:18.8385746Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.8386200Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.8386555Z }, | |
2021-07-11T02:17:18.8386909Z "update_name": { | |
2021-07-11T02:17:18.8387408Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.8387946Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.8388367Z "write": True, | |
2021-07-11T02:17:18.8388711Z }, | |
2021-07-11T02:17:18.8389016Z } | |
2021-07-11T02:17:18.8389300Z } | |
2021-07-11T02:17:18.8389591Z } | |
2021-07-11T02:17:18.8389871Z }, | |
2021-07-11T02:17:18.8390164Z ) as client: | |
2021-07-11T02:17:18.8390577Z > yield client | |
2021-07-11T02:17:18.8390809Z | |
2021-07-11T02:17:18.8391261Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.8391774Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8392357Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.8392907Z next(self.gen) | |
2021-07-11T02:17:18.8393440Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8393996Z yield TestClient(ds) | |
2021-07-11T02:17:18.8394567Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8395134Z self.cleanup() | |
2021-07-11T02:17:18.8395700Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8396322Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8396923Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8397527Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8398170Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8398838Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8399288Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8399526Z | |
2021-07-11T02:17:18.8399984Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpo2s460hc' | |
2021-07-11T02:17:18.8400647Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B1863C80> | |
2021-07-11T02:17:18.8400997Z | |
2021-07-11T02:17:18.8401369Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8401752Z try: | |
2021-07-11T02:17:18.8402115Z if os.path.islink(path): | |
2021-07-11T02:17:18.8402656Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8403311Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8403781Z except OSError: | |
2021-07-11T02:17:18.8404279Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8404857Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8405269Z return | |
2021-07-11T02:17:18.8405580Z names = [] | |
2021-07-11T02:17:18.8405868Z try: | |
2021-07-11T02:17:18.8406233Z names = os.listdir(path) | |
2021-07-11T02:17:18.8406650Z except OSError: | |
2021-07-11T02:17:18.8407107Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8407560Z for name in names: | |
2021-07-11T02:17:18.8408007Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8408395Z try: | |
2021-07-11T02:17:18.8408787Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8409218Z except OSError: | |
2021-07-11T02:17:18.8409565Z mode = 0 | |
2021-07-11T02:17:18.8409928Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8410375Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8410818Z else: | |
2021-07-11T02:17:18.8411127Z try: | |
2021-07-11T02:17:18.8411471Z > os.unlink(fullname) | |
2021-07-11T02:17:18.8412386Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpo2s460hc\\data.db' | |
2021-07-11T02:17:18.8413116Z | |
2021-07-11T02:17:18.8413670Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.8414393Z _____________ ERROR at teardown of test_canned_query_permissions ______________ | |
2021-07-11T02:17:18.8414758Z | |
2021-07-11T02:17:18.8415088Z @pytest.fixture | |
2021-07-11T02:17:18.8415487Z def canned_write_client(): | |
2021-07-11T02:17:18.8415890Z with make_app_client( | |
2021-07-11T02:17:18.8416416Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:18.8416888Z metadata={ | |
2021-07-11T02:17:18.8417302Z "databases": { | |
2021-07-11T02:17:18.8417651Z "data": { | |
2021-07-11T02:17:18.8417981Z "queries": { | |
2021-07-11T02:17:18.8418425Z "canned_read": {"sql": "select * from names"}, | |
2021-07-11T02:17:18.8418865Z "add_name": { | |
2021-07-11T02:17:18.8419311Z "sql": "insert into names (name) values (:name)", | |
2021-07-11T02:17:18.8419782Z "write": True, | |
2021-07-11T02:17:18.8420275Z "on_success_redirect": "/data/add_name?success", | |
2021-07-11T02:17:18.8420929Z }, | |
2021-07-11T02:17:18.8421310Z "add_name_specify_id": { | |
2021-07-11T02:17:18.8421835Z "sql": "insert into names (rowid, name) values (:rowid, :name)", | |
2021-07-11T02:17:18.8422339Z "write": True, | |
2021-07-11T02:17:18.8422850Z "on_error_redirect": "/data/add_name_specify_id?error", | |
2021-07-11T02:17:18.8423296Z }, | |
2021-07-11T02:17:18.8423652Z "delete_name": { | |
2021-07-11T02:17:18.8424135Z "sql": "delete from names where rowid = :rowid", | |
2021-07-11T02:17:18.8424596Z "write": True, | |
2021-07-11T02:17:18.8425061Z "on_success_message": "Name deleted", | |
2021-07-11T02:17:18.8425528Z "allow": {"id": "root"}, | |
2021-07-11T02:17:18.8425863Z }, | |
2021-07-11T02:17:18.8426213Z "update_name": { | |
2021-07-11T02:17:18.8426716Z "sql": "update names set name = :name where rowid = :rowid", | |
2021-07-11T02:17:18.8427322Z "params": ["rowid", "name", "extra"], | |
2021-07-11T02:17:18.8427767Z "write": True, | |
2021-07-11T02:17:18.8428115Z }, | |
2021-07-11T02:17:18.8428407Z } | |
2021-07-11T02:17:18.8428702Z } | |
2021-07-11T02:17:18.8428988Z } | |
2021-07-11T02:17:18.8429257Z }, | |
2021-07-11T02:17:18.8429565Z ) as client: | |
2021-07-11T02:17:18.8429890Z > yield client | |
2021-07-11T02:17:18.8430120Z | |
2021-07-11T02:17:18.8430613Z D:\a\datasette\datasette\tests\test_canned_queries.py:43: | |
2021-07-11T02:17:18.8431127Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8431688Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.8432281Z next(self.gen) | |
2021-07-11T02:17:18.8432823Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8433366Z yield TestClient(ds) | |
2021-07-11T02:17:18.8433948Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8434505Z self.cleanup() | |
2021-07-11T02:17:18.8435096Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8435725Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8436315Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8436919Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8437561Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8438206Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8438662Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8438899Z | |
2021-07-11T02:17:18.8439363Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpoc9gwpkg' | |
2021-07-11T02:17:18.8440005Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B2B16BF8> | |
2021-07-11T02:17:18.8440373Z | |
2021-07-11T02:17:18.8440771Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8441201Z try: | |
2021-07-11T02:17:18.8441580Z if os.path.islink(path): | |
2021-07-11T02:17:18.8442122Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8442714Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8443197Z except OSError: | |
2021-07-11T02:17:18.8443684Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8444239Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8444654Z return | |
2021-07-11T02:17:18.8444949Z names = [] | |
2021-07-11T02:17:18.8445240Z try: | |
2021-07-11T02:17:18.8445601Z names = os.listdir(path) | |
2021-07-11T02:17:18.8445990Z except OSError: | |
2021-07-11T02:17:18.8446460Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8446908Z for name in names: | |
2021-07-11T02:17:18.8447339Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8447744Z try: | |
2021-07-11T02:17:18.8448132Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8448550Z except OSError: | |
2021-07-11T02:17:18.8448912Z mode = 0 | |
2021-07-11T02:17:18.8449258Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8449714Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8450126Z else: | |
2021-07-11T02:17:18.8450422Z try: | |
2021-07-11T02:17:18.8450807Z > os.unlink(fullname) | |
2021-07-11T02:17:18.8451731Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpoc9gwpkg\\data.db' | |
2021-07-11T02:17:18.8452482Z | |
2021-07-11T02:17:18.8453088Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.8453886Z _____ ERROR at setup of test_view_classes_are_documented[AllowDebugView] ______ | |
2021-07-11T02:17:18.8454314Z | |
2021-07-11T02:17:18.8454693Z @pytest.fixture(scope="session") | |
2021-07-11T02:17:18.8455154Z def documented_views(): | |
2021-07-11T02:17:18.8455537Z view_labels = set() | |
2021-07-11T02:17:18.8455947Z for filename in docs_path.glob("*.rst"): | |
2021-07-11T02:17:18.8456423Z > for label in get_labels(filename): | |
2021-07-11T02:17:18.8456708Z | |
2021-07-11T02:17:18.8457102Z D:\a\datasette\datasette\tests\test_docs.py:80: | |
2021-07-11T02:17:18.8457569Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8458079Z D:\a\datasette\datasette\tests\test_docs.py:22: in get_labels | |
2021-07-11T02:17:18.8458649Z content = (docs_path / filename).read_text() | |
2021-07-11T02:17:18.8459287Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\pathlib.py:1197: in read_text | |
2021-07-11T02:17:18.8459840Z return f.read() | |
2021-07-11T02:17:18.8460185Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8460424Z | |
2021-07-11T02:17:18.8461087Z self = <encodings.cp1252.IncrementalDecoder object at 0x000001D1B51E4F60> | |
2021-07-11T02:17:18.8462446Z input = b'.. _contributing:\r\n\r\nContributing\r\n============\r\n\r\nDatasette is an open source project. We welcome contrib... ``_codemirror.html`` template to reference the new files\r\n* ``git rm`` the old files, ``git add`` the new files\r\n' | |
2021-07-11T02:17:18.8463413Z final = True | |
2021-07-11T02:17:18.8463630Z | |
2021-07-11T02:17:18.8464009Z def decode(self, input, final=False): | |
2021-07-11T02:17:18.8464712Z > return codecs.charmap_decode(input,self.errors,decoding_table)[0] | |
2021-07-11T02:17:18.8465651Z E UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 5758: character maps to <undefined> | |
2021-07-11T02:17:18.8466206Z | |
2021-07-11T02:17:18.8466822Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\encodings\cp1252.py:23: UnicodeDecodeError | |
2021-07-11T02:17:18.8467711Z ______ ERROR at setup of test_view_classes_are_documented[AuthTokenView] ______ | |
2021-07-11T02:17:18.8468129Z | |
2021-07-11T02:17:18.8468504Z @pytest.fixture(scope="session") | |
2021-07-11T02:17:18.8468969Z def documented_views(): | |
2021-07-11T02:17:18.8469348Z view_labels = set() | |
2021-07-11T02:17:18.8469779Z for filename in docs_path.glob("*.rst"): | |
2021-07-11T02:17:18.8470260Z > for label in get_labels(filename): | |
2021-07-11T02:17:18.8470576Z | |
2021-07-11T02:17:18.8470977Z D:\a\datasette\datasette\tests\test_docs.py:80: | |
2021-07-11T02:17:18.8471428Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8471925Z D:\a\datasette\datasette\tests\test_docs.py:22: in get_labels | |
2021-07-11T02:17:18.8472501Z content = (docs_path / filename).read_text() | |
2021-07-11T02:17:18.8473125Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\pathlib.py:1197: in read_text | |
2021-07-11T02:17:18.8473675Z return f.read() | |
2021-07-11T02:17:18.8474036Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8474259Z | |
2021-07-11T02:17:18.8474892Z self = <encodings.cp1252.IncrementalDecoder object at 0x000001D1B51E4F60> | |
2021-07-11T02:17:18.8476247Z input = b'.. _contributing:\r\n\r\nContributing\r\n============\r\n\r\nDatasette is an open source project. We welcome contrib... ``_codemirror.html`` template to reference the new files\r\n* ``git rm`` the old files, ``git add`` the new files\r\n' | |
2021-07-11T02:17:18.8477247Z final = True | |
2021-07-11T02:17:18.8477451Z | |
2021-07-11T02:17:18.8477822Z def decode(self, input, final=False): | |
2021-07-11T02:17:18.8478516Z > return codecs.charmap_decode(input,self.errors,decoding_table)[0] | |
2021-07-11T02:17:18.8479449Z E UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 5758: character maps to <undefined> | |
2021-07-11T02:17:18.8480053Z | |
2021-07-11T02:17:18.8480687Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\encodings\cp1252.py:23: UnicodeDecodeError | |
2021-07-11T02:17:18.8481527Z ______ ERROR at setup of test_view_classes_are_documented[DatabaseView] _______ | |
2021-07-11T02:17:18.8481923Z | |
2021-07-11T02:17:18.8482314Z @pytest.fixture(scope="session") | |
2021-07-11T02:17:18.8482780Z def documented_views(): | |
2021-07-11T02:17:18.8483158Z view_labels = set() | |
2021-07-11T02:17:18.8483587Z for filename in docs_path.glob("*.rst"): | |
2021-07-11T02:17:18.8484062Z > for label in get_labels(filename): | |
2021-07-11T02:17:18.8484349Z | |
2021-07-11T02:17:18.8484749Z D:\a\datasette\datasette\tests\test_docs.py:80: | |
2021-07-11T02:17:18.8485210Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8485702Z D:\a\datasette\datasette\tests\test_docs.py:22: in get_labels | |
2021-07-11T02:17:18.8486267Z content = (docs_path / filename).read_text() | |
2021-07-11T02:17:18.8486892Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\pathlib.py:1197: in read_text | |
2021-07-11T02:17:18.8487416Z return f.read() | |
2021-07-11T02:17:18.8487771Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8488009Z | |
2021-07-11T02:17:18.8488648Z self = <encodings.cp1252.IncrementalDecoder object at 0x000001D1B51E4F60> | |
2021-07-11T02:17:18.8489991Z input = b'.. _contributing:\r\n\r\nContributing\r\n============\r\n\r\nDatasette is an open source project. We welcome contrib... ``_codemirror.html`` template to reference the new files\r\n* ``git rm`` the old files, ``git add`` the new files\r\n' | |
2021-07-11T02:17:18.8491003Z final = True | |
2021-07-11T02:17:18.8491215Z | |
2021-07-11T02:17:18.8491572Z def decode(self, input, final=False): | |
2021-07-11T02:17:18.8492264Z > return codecs.charmap_decode(input,self.errors,decoding_table)[0] | |
2021-07-11T02:17:18.8493231Z E UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 5758: character maps to <undefined> | |
2021-07-11T02:17:18.8493782Z | |
2021-07-11T02:17:18.8494425Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\encodings\cp1252.py:23: UnicodeDecodeError | |
2021-07-11T02:17:18.8495246Z ________ ERROR at setup of test_view_classes_are_documented[IndexView] ________ | |
2021-07-11T02:17:18.8495635Z | |
2021-07-11T02:17:18.8496024Z @pytest.fixture(scope="session") | |
2021-07-11T02:17:18.8496475Z def documented_views(): | |
2021-07-11T02:17:18.8496867Z view_labels = set() | |
2021-07-11T02:17:18.8497281Z for filename in docs_path.glob("*.rst"): | |
2021-07-11T02:17:18.8497760Z > for label in get_labels(filename): | |
2021-07-11T02:17:18.8498052Z | |
2021-07-11T02:17:18.8498468Z D:\a\datasette\datasette\tests\test_docs.py:80: | |
2021-07-11T02:17:18.8498919Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8499427Z D:\a\datasette\datasette\tests\test_docs.py:22: in get_labels | |
2021-07-11T02:17:18.8500017Z content = (docs_path / filename).read_text() | |
2021-07-11T02:17:18.8500656Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\pathlib.py:1197: in read_text | |
2021-07-11T02:17:18.8501199Z return f.read() | |
2021-07-11T02:17:18.8501545Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8501781Z | |
2021-07-11T02:17:18.8502418Z self = <encodings.cp1252.IncrementalDecoder object at 0x000001D1B51E4F60> | |
2021-07-11T02:17:18.8503779Z input = b'.. _contributing:\r\n\r\nContributing\r\n============\r\n\r\nDatasette is an open source project. We welcome contrib... ``_codemirror.html`` template to reference the new files\r\n* ``git rm`` the old files, ``git add`` the new files\r\n' | |
2021-07-11T02:17:18.8504755Z final = True | |
2021-07-11T02:17:18.8504970Z | |
2021-07-11T02:17:18.8505345Z def decode(self, input, final=False): | |
2021-07-11T02:17:18.8506037Z > return codecs.charmap_decode(input,self.errors,decoding_table)[0] | |
2021-07-11T02:17:18.8507042Z E UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 5758: character maps to <undefined> | |
2021-07-11T02:17:18.8507588Z | |
2021-07-11T02:17:18.8508201Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\encodings\cp1252.py:23: UnicodeDecodeError | |
2021-07-11T02:17:18.8509022Z ______ ERROR at setup of test_view_classes_are_documented[JsonDataView] _______ | |
2021-07-11T02:17:18.8509431Z | |
2021-07-11T02:17:18.8509819Z @pytest.fixture(scope="session") | |
2021-07-11T02:17:18.8510286Z def documented_views(): | |
2021-07-11T02:17:18.8510693Z view_labels = set() | |
2021-07-11T02:17:18.8511128Z for filename in docs_path.glob("*.rst"): | |
2021-07-11T02:17:18.8511592Z > for label in get_labels(filename): | |
2021-07-11T02:17:18.8511887Z | |
2021-07-11T02:17:18.8512304Z D:\a\datasette\datasette\tests\test_docs.py:80: | |
2021-07-11T02:17:18.8512770Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8513269Z D:\a\datasette\datasette\tests\test_docs.py:22: in get_labels | |
2021-07-11T02:17:18.8513859Z content = (docs_path / filename).read_text() | |
2021-07-11T02:17:18.8514507Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\pathlib.py:1197: in read_text | |
2021-07-11T02:17:18.8515040Z return f.read() | |
2021-07-11T02:17:18.8515394Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8515624Z | |
2021-07-11T02:17:18.8516242Z self = <encodings.cp1252.IncrementalDecoder object at 0x000001D1B51E4F60> | |
2021-07-11T02:17:18.8517593Z input = b'.. _contributing:\r\n\r\nContributing\r\n============\r\n\r\nDatasette is an open source project. We welcome contrib... ``_codemirror.html`` template to reference the new files\r\n* ``git rm`` the old files, ``git add`` the new files\r\n' | |
2021-07-11T02:17:18.8518568Z final = True | |
2021-07-11T02:17:18.8518779Z | |
2021-07-11T02:17:18.8519137Z def decode(self, input, final=False): | |
2021-07-11T02:17:18.8519839Z > return codecs.charmap_decode(input,self.errors,decoding_table)[0] | |
2021-07-11T02:17:18.8521201Z E UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 5758: character maps to <undefined> | |
2021-07-11T02:17:18.8521846Z | |
2021-07-11T02:17:18.8522455Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\encodings\cp1252.py:23: UnicodeDecodeError | |
2021-07-11T02:17:18.8523279Z _______ ERROR at setup of test_view_classes_are_documented[LogoutView] ________ | |
2021-07-11T02:17:18.8523676Z | |
2021-07-11T02:17:18.8524058Z @pytest.fixture(scope="session") | |
2021-07-11T02:17:18.8524525Z def documented_views(): | |
2021-07-11T02:17:18.8524922Z view_labels = set() | |
2021-07-11T02:17:18.8525345Z for filename in docs_path.glob("*.rst"): | |
2021-07-11T02:17:18.8525827Z > for label in get_labels(filename): | |
2021-07-11T02:17:18.8526118Z | |
2021-07-11T02:17:18.8526523Z D:\a\datasette\datasette\tests\test_docs.py:80: | |
2021-07-11T02:17:18.8526986Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8527496Z D:\a\datasette\datasette\tests\test_docs.py:22: in get_labels | |
2021-07-11T02:17:18.8528065Z content = (docs_path / filename).read_text() | |
2021-07-11T02:17:18.8528708Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\pathlib.py:1197: in read_text | |
2021-07-11T02:17:18.8529251Z return f.read() | |
2021-07-11T02:17:18.8529595Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8529825Z | |
2021-07-11T02:17:18.8530456Z self = <encodings.cp1252.IncrementalDecoder object at 0x000001D1B51E4F60> | |
2021-07-11T02:17:18.8531971Z input = b'.. _contributing:\r\n\r\nContributing\r\n============\r\n\r\nDatasette is an open source project. We welcome contrib... ``_codemirror.html`` template to reference the new files\r\n* ``git rm`` the old files, ``git add`` the new files\r\n' | |
2021-07-11T02:17:18.8532970Z final = True | |
2021-07-11T02:17:18.8533186Z | |
2021-07-11T02:17:18.8533560Z def decode(self, input, final=False): | |
2021-07-11T02:17:18.8534313Z > return codecs.charmap_decode(input,self.errors,decoding_table)[0] | |
2021-07-11T02:17:18.8535271Z E UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 5758: character maps to <undefined> | |
2021-07-11T02:17:18.8535818Z | |
2021-07-11T02:17:18.8536434Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\encodings\cp1252.py:23: UnicodeDecodeError | |
2021-07-11T02:17:18.8537304Z ____ ERROR at setup of test_view_classes_are_documented[MessagesDebugView] ____ | |
2021-07-11T02:17:18.8537758Z | |
2021-07-11T02:17:18.8538150Z @pytest.fixture(scope="session") | |
2021-07-11T02:17:18.8538606Z def documented_views(): | |
2021-07-11T02:17:18.8539001Z view_labels = set() | |
2021-07-11T02:17:18.8539437Z for filename in docs_path.glob("*.rst"): | |
2021-07-11T02:17:18.8539903Z > for label in get_labels(filename): | |
2021-07-11T02:17:18.8540194Z | |
2021-07-11T02:17:18.8540634Z D:\a\datasette\datasette\tests\test_docs.py:80: | |
2021-07-11T02:17:18.8541100Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8541616Z D:\a\datasette\datasette\tests\test_docs.py:22: in get_labels | |
2021-07-11T02:17:18.8542199Z content = (docs_path / filename).read_text() | |
2021-07-11T02:17:18.8542822Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\pathlib.py:1197: in read_text | |
2021-07-11T02:17:18.8543377Z return f.read() | |
2021-07-11T02:17:18.8543737Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8543970Z | |
2021-07-11T02:17:18.8544609Z self = <encodings.cp1252.IncrementalDecoder object at 0x000001D1B51E4F60> | |
2021-07-11T02:17:18.8545967Z input = b'.. _contributing:\r\n\r\nContributing\r\n============\r\n\r\nDatasette is an open source project. We welcome contrib... ``_codemirror.html`` template to reference the new files\r\n* ``git rm`` the old files, ``git add`` the new files\r\n' | |
2021-07-11T02:17:18.8546966Z final = True | |
2021-07-11T02:17:18.8547186Z | |
2021-07-11T02:17:18.8547550Z def decode(self, input, final=False): | |
2021-07-11T02:17:18.8548263Z > return codecs.charmap_decode(input,self.errors,decoding_table)[0] | |
2021-07-11T02:17:18.8549293Z E UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 5758: character maps to <undefined> | |
2021-07-11T02:17:18.8549841Z | |
2021-07-11T02:17:18.8550449Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\encodings\cp1252.py:23: UnicodeDecodeError | |
2021-07-11T02:17:18.8551378Z __ ERROR at setup of test_view_classes_are_documented[PatternPortfolioView] ___ | |
2021-07-11T02:17:18.8551859Z | |
2021-07-11T02:17:18.8552238Z @pytest.fixture(scope="session") | |
2021-07-11T02:17:18.8552706Z def documented_views(): | |
2021-07-11T02:17:18.8553088Z view_labels = set() | |
2021-07-11T02:17:18.8553525Z for filename in docs_path.glob("*.rst"): | |
2021-07-11T02:17:18.8554008Z > for label in get_labels(filename): | |
2021-07-11T02:17:18.8554295Z | |
2021-07-11T02:17:18.8554695Z D:\a\datasette\datasette\tests\test_docs.py:80: | |
2021-07-11T02:17:18.8555166Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8555683Z D:\a\datasette\datasette\tests\test_docs.py:22: in get_labels | |
2021-07-11T02:17:18.8556254Z content = (docs_path / filename).read_text() | |
2021-07-11T02:17:18.8556893Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\pathlib.py:1197: in read_text | |
2021-07-11T02:17:18.8557433Z return f.read() | |
2021-07-11T02:17:18.8557789Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8558031Z | |
2021-07-11T02:17:18.8558673Z self = <encodings.cp1252.IncrementalDecoder object at 0x000001D1B51E4F60> | |
2021-07-11T02:17:18.8560011Z input = b'.. _contributing:\r\n\r\nContributing\r\n============\r\n\r\nDatasette is an open source project. We welcome contrib... ``_codemirror.html`` template to reference the new files\r\n* ``git rm`` the old files, ``git add`` the new files\r\n' | |
2021-07-11T02:17:18.8561031Z final = True | |
2021-07-11T02:17:18.8561310Z | |
2021-07-11T02:17:18.8561692Z def decode(self, input, final=False): | |
2021-07-11T02:17:18.8562374Z > return codecs.charmap_decode(input,self.errors,decoding_table)[0] | |
2021-07-11T02:17:18.8563329Z E UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 5758: character maps to <undefined> | |
2021-07-11T02:17:18.8563869Z | |
2021-07-11T02:17:18.8564462Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\encodings\cp1252.py:23: UnicodeDecodeError | |
2021-07-11T02:17:18.8565358Z __ ERROR at setup of test_view_classes_are_documented[PermissionsDebugView] ___ | |
2021-07-11T02:17:18.8565835Z | |
2021-07-11T02:17:18.8566222Z @pytest.fixture(scope="session") | |
2021-07-11T02:17:18.8566676Z def documented_views(): | |
2021-07-11T02:17:18.8567066Z view_labels = set() | |
2021-07-11T02:17:18.8567483Z for filename in docs_path.glob("*.rst"): | |
2021-07-11T02:17:18.8567965Z > for label in get_labels(filename): | |
2021-07-11T02:17:18.8568254Z | |
2021-07-11T02:17:18.8568673Z D:\a\datasette\datasette\tests\test_docs.py:80: | |
2021-07-11T02:17:18.8569131Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8569647Z D:\a\datasette\datasette\tests\test_docs.py:22: in get_labels | |
2021-07-11T02:17:18.8570238Z content = (docs_path / filename).read_text() | |
2021-07-11T02:17:18.8570888Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\pathlib.py:1197: in read_text | |
2021-07-11T02:17:18.8571438Z return f.read() | |
2021-07-11T02:17:18.8571798Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8572018Z | |
2021-07-11T02:17:18.8572651Z self = <encodings.cp1252.IncrementalDecoder object at 0x000001D1B51E4F60> | |
2021-07-11T02:17:18.8573997Z input = b'.. _contributing:\r\n\r\nContributing\r\n============\r\n\r\nDatasette is an open source project. We welcome contrib... ``_codemirror.html`` template to reference the new files\r\n* ``git rm`` the old files, ``git add`` the new files\r\n' | |
2021-07-11T02:17:18.8574964Z final = True | |
2021-07-11T02:17:18.8575180Z | |
2021-07-11T02:17:18.8575552Z def decode(self, input, final=False): | |
2021-07-11T02:17:18.8576898Z > return codecs.charmap_decode(input,self.errors,decoding_table)[0] | |
2021-07-11T02:17:18.8577872Z E UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 5758: character maps to <undefined> | |
2021-07-11T02:17:18.8578422Z | |
2021-07-11T02:17:18.8579035Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\encodings\cp1252.py:23: UnicodeDecodeError | |
2021-07-11T02:17:18.8579828Z _________ ERROR at setup of test_view_classes_are_documented[RowView] _________ | |
2021-07-11T02:17:18.8580213Z | |
2021-07-11T02:17:18.8580630Z @pytest.fixture(scope="session") | |
2021-07-11T02:17:18.8581092Z def documented_views(): | |
2021-07-11T02:17:18.8581472Z view_labels = set() | |
2021-07-11T02:17:18.8581906Z for filename in docs_path.glob("*.rst"): | |
2021-07-11T02:17:18.8582388Z > for label in get_labels(filename): | |
2021-07-11T02:17:18.8582669Z | |
2021-07-11T02:17:18.8583082Z D:\a\datasette\datasette\tests\test_docs.py:80: | |
2021-07-11T02:17:18.8583553Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8584054Z D:\a\datasette\datasette\tests\test_docs.py:22: in get_labels | |
2021-07-11T02:17:18.8584634Z content = (docs_path / filename).read_text() | |
2021-07-11T02:17:18.8585268Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\pathlib.py:1197: in read_text | |
2021-07-11T02:17:18.8585804Z return f.read() | |
2021-07-11T02:17:18.8586166Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8586401Z | |
2021-07-11T02:17:18.8587031Z self = <encodings.cp1252.IncrementalDecoder object at 0x000001D1B51E4F60> | |
2021-07-11T02:17:18.8588400Z input = b'.. _contributing:\r\n\r\nContributing\r\n============\r\n\r\nDatasette is an open source project. We welcome contrib... ``_codemirror.html`` template to reference the new files\r\n* ``git rm`` the old files, ``git add`` the new files\r\n' | |
2021-07-11T02:17:18.8589451Z final = True | |
2021-07-11T02:17:18.8589666Z | |
2021-07-11T02:17:18.8590032Z def decode(self, input, final=False): | |
2021-07-11T02:17:18.8592217Z > return codecs.charmap_decode(input,self.errors,decoding_table)[0] | |
2021-07-11T02:17:18.8593175Z E UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 5758: character maps to <undefined> | |
2021-07-11T02:17:18.8593723Z | |
2021-07-11T02:17:18.8594322Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\encodings\cp1252.py:23: UnicodeDecodeError | |
2021-07-11T02:17:18.8595145Z ________ ERROR at setup of test_view_classes_are_documented[TableView] ________ | |
2021-07-11T02:17:18.8595543Z | |
2021-07-11T02:17:18.8595919Z @pytest.fixture(scope="session") | |
2021-07-11T02:17:18.8596386Z def documented_views(): | |
2021-07-11T02:17:18.8596781Z view_labels = set() | |
2021-07-11T02:17:18.8597200Z for filename in docs_path.glob("*.rst"): | |
2021-07-11T02:17:18.8597700Z > for label in get_labels(filename): | |
2021-07-11T02:17:18.8598000Z | |
2021-07-11T02:17:18.8598415Z D:\a\datasette\datasette\tests\test_docs.py:80: | |
2021-07-11T02:17:18.8598874Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8599384Z D:\a\datasette\datasette\tests\test_docs.py:22: in get_labels | |
2021-07-11T02:17:18.8599954Z content = (docs_path / filename).read_text() | |
2021-07-11T02:17:18.8600617Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\pathlib.py:1197: in read_text | |
2021-07-11T02:17:18.8601169Z return f.read() | |
2021-07-11T02:17:18.8601520Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8601756Z | |
2021-07-11T02:17:18.8602402Z self = <encodings.cp1252.IncrementalDecoder object at 0x000001D1B51E4F60> | |
2021-07-11T02:17:18.8603766Z input = b'.. _contributing:\r\n\r\nContributing\r\n============\r\n\r\nDatasette is an open source project. We welcome contrib... ``_codemirror.html`` template to reference the new files\r\n* ``git rm`` the old files, ``git add`` the new files\r\n' | |
2021-07-11T02:17:18.8604745Z final = True | |
2021-07-11T02:17:18.8604963Z | |
2021-07-11T02:17:18.8605414Z def decode(self, input, final=False): | |
2021-07-11T02:17:18.8606123Z > return codecs.charmap_decode(input,self.errors,decoding_table)[0] | |
2021-07-11T02:17:18.8607054Z E UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 5758: character maps to <undefined> | |
2021-07-11T02:17:18.8607601Z | |
2021-07-11T02:17:18.8608214Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\encodings\cp1252.py:23: UnicodeDecodeError | |
2021-07-11T02:17:18.8609009Z ________ ERROR at teardown of test_initial_path_for_datasette[dbs2-/] _________ | |
2021-07-11T02:17:18.8609389Z | |
2021-07-11T02:17:18.8609777Z @pytest.fixture(scope="session") | |
2021-07-11T02:17:18.8610221Z def app_client(): | |
2021-07-11T02:17:18.8610642Z with make_app_client() as client: | |
2021-07-11T02:17:18.8611049Z > yield client | |
2021-07-11T02:17:18.8611277Z | |
2021-07-11T02:17:18.8611691Z D:\a\datasette\datasette\tests\fixtures.py:162: | |
2021-07-11T02:17:18.8612177Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8612752Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.8613301Z next(self.gen) | |
2021-07-11T02:17:18.8613841Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8614396Z yield TestClient(ds) | |
2021-07-11T02:17:18.8614971Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8615537Z self.cleanup() | |
2021-07-11T02:17:18.8616102Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8616720Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8617323Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8617921Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8618624Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8619296Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8619748Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8619986Z | |
2021-07-11T02:17:18.8620440Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpnobr08_f' | |
2021-07-11T02:17:18.8621121Z onerror = <function rmtree.<locals>.onerror at 0x000001D1ABB33AE8> | |
2021-07-11T02:17:18.8621485Z | |
2021-07-11T02:17:18.8621856Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8622243Z try: | |
2021-07-11T02:17:18.8622606Z if os.path.islink(path): | |
2021-07-11T02:17:18.8623151Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8623759Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8624234Z except OSError: | |
2021-07-11T02:17:18.8624734Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8625316Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8625732Z return | |
2021-07-11T02:17:18.8626042Z names = [] | |
2021-07-11T02:17:18.8626332Z try: | |
2021-07-11T02:17:18.8626695Z names = os.listdir(path) | |
2021-07-11T02:17:18.8627103Z except OSError: | |
2021-07-11T02:17:18.8627553Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8628005Z for name in names: | |
2021-07-11T02:17:18.8628457Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8628849Z try: | |
2021-07-11T02:17:18.8629240Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8629667Z except OSError: | |
2021-07-11T02:17:18.8630010Z mode = 0 | |
2021-07-11T02:17:18.8630375Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8631950Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8632403Z else: | |
2021-07-11T02:17:18.8632716Z try: | |
2021-07-11T02:17:18.8633242Z > os.unlink(fullname) | |
2021-07-11T02:17:18.8634320Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpnobr08_f\\fixtures.db' | |
2021-07-11T02:17:18.8635096Z | |
2021-07-11T02:17:18.8635659Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.8636284Z ================================== FAILURES =================================== | |
2021-07-11T02:17:18.8636736Z ___________________________ test_package_with_port ____________________________ | |
2021-07-11T02:17:18.8637026Z | |
2021-07-11T02:17:18.8637388Z mock_call = <MagicMock name='call' id='2000071363608'> | |
2021-07-11T02:17:18.8637874Z mock_which = <MagicMock name='which' id='2000070249720'> | |
2021-07-11T02:17:18.8638172Z | |
2021-07-11T02:17:18.8638545Z @mock.patch("shutil.which") | |
2021-07-11T02:17:18.8639046Z @mock.patch("datasette.cli.call") | |
2021-07-11T02:17:18.8639600Z def test_package_with_port(mock_call, mock_which): | |
2021-07-11T02:17:18.8640111Z mock_which.return_value = True | |
2021-07-11T02:17:18.8640634Z capture = CaptureDockerfile() | |
2021-07-11T02:17:18.8641142Z mock_call.side_effect = capture | |
2021-07-11T02:17:18.8641566Z runner = CliRunner() | |
2021-07-11T02:17:18.8642042Z with runner.isolated_filesystem(): | |
2021-07-11T02:17:18.8642529Z with open("test.db", "w") as fp: | |
2021-07-11T02:17:18.8642921Z fp.write("data") | |
2021-07-11T02:17:18.8643338Z result = runner.invoke( | |
2021-07-11T02:17:18.8643873Z cli.cli, ["package", "test.db", "-p", "8080", "--secret", "sekrit"] | |
2021-07-11T02:17:18.8644307Z ) | |
2021-07-11T02:17:18.8644666Z > assert 0 == result.exit_code | |
2021-07-11T02:17:18.8645128Z E AssertionError: assert 0 == 1 | |
2021-07-11T02:17:18.8645971Z E + where 1 = <Result PermissionError(13, 'The process cannot access the file because it is being used by another process')>.exit_code | |
2021-07-11T02:17:18.8646554Z | |
2021-07-11T02:17:18.8646967Z tests\test_package.py:56: AssertionError | |
2021-07-11T02:17:18.8647449Z ________________________________ test_package _________________________________ | |
2021-07-11T02:17:18.8647723Z | |
2021-07-11T02:17:18.8648094Z mock_call = <MagicMock name='call' id='2000070264312'> | |
2021-07-11T02:17:18.8648580Z mock_which = <MagicMock name='which' id='2000070264424'> | |
2021-07-11T02:17:18.8648865Z | |
2021-07-11T02:17:18.8649226Z @mock.patch("shutil.which") | |
2021-07-11T02:17:18.8649738Z @mock.patch("datasette.cli.call") | |
2021-07-11T02:17:18.8650248Z def test_package(mock_call, mock_which): | |
2021-07-11T02:17:18.8650761Z mock_which.return_value = True | |
2021-07-11T02:17:18.8651196Z runner = CliRunner() | |
2021-07-11T02:17:18.8651653Z capture = CaptureDockerfile() | |
2021-07-11T02:17:18.8652167Z mock_call.side_effect = capture | |
2021-07-11T02:17:18.8652682Z with runner.isolated_filesystem(): | |
2021-07-11T02:17:18.8653160Z with open("test.db", "w") as fp: | |
2021-07-11T02:17:18.8653567Z fp.write("data") | |
2021-07-11T02:17:18.8654119Z result = runner.invoke(cli.cli, ["package", "test.db", "--secret", "sekrit"]) | |
2021-07-11T02:17:18.8654708Z > assert 0 == result.exit_code | |
2021-07-11T02:17:18.8655174Z E AssertionError: assert 0 == 1 | |
2021-07-11T02:17:18.8655953Z E + where 1 = <Result PermissionError(13, 'The process cannot access the file because it is being used by another process')>.exit_code | |
2021-07-11T02:17:18.8656533Z | |
2021-07-11T02:17:18.8656945Z tests\test_package.py:38: AssertionError | |
2021-07-11T02:17:18.8657456Z _____________________________ test_serve_with_get _____________________________ | |
2021-07-11T02:17:18.8657730Z | |
2021-07-11T02:17:18.8658826Z tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x000001D1AB908978>, _basetemp=WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0')) | |
2021-07-11T02:17:18.8659892Z | |
2021-07-11T02:17:18.8660285Z def test_serve_with_get(tmp_path_factory): | |
2021-07-11T02:17:18.8660907Z plugins_dir = tmp_path_factory.mktemp("plugins_for_serve_with_get") | |
2021-07-11T02:17:18.8661547Z (plugins_dir / "init_for_serve_with_get.py").write_text( | |
2021-07-11T02:17:18.8662057Z textwrap.dedent( | |
2021-07-11T02:17:18.8662417Z """ | |
2021-07-11T02:17:18.8662805Z from datasette import hookimpl | |
2021-07-11T02:17:18.8663178Z | |
2021-07-11T02:17:18.8663469Z @hookimpl | |
2021-07-11T02:17:18.8663861Z def startup(datasette): | |
2021-07-11T02:17:18.8664277Z with open("{}", "w") as fp: | |
2021-07-11T02:17:18.8664657Z fp.write("hello") | |
2021-07-11T02:17:18.8665007Z """.format( | |
2021-07-11T02:17:18.8665401Z str(plugins_dir / "hello.txt") | |
2021-07-11T02:17:18.8665773Z ), | |
2021-07-11T02:17:18.8666058Z ), | |
2021-07-11T02:17:18.8666348Z "utf-8", | |
2021-07-11T02:17:18.8666639Z ) | |
2021-07-11T02:17:18.8666972Z runner = CliRunner() | |
2021-07-11T02:17:18.8667384Z result = runner.invoke( | |
2021-07-11T02:17:18.8667759Z cli, | |
2021-07-11T02:17:18.8668037Z [ | |
2021-07-11T02:17:18.8668344Z "serve", | |
2021-07-11T02:17:18.8668680Z "--memory", | |
2021-07-11T02:17:18.8669043Z "--plugins-dir", | |
2021-07-11T02:17:18.8669435Z str(plugins_dir), | |
2021-07-11T02:17:18.8669785Z "--get", | |
2021-07-11T02:17:18.8670238Z "/_memory.json?sql=select+sqlite_version()", | |
2021-07-11T02:17:18.8670694Z ], | |
2021-07-11T02:17:18.8670968Z ) | |
2021-07-11T02:17:18.8671379Z > assert 0 == result.exit_code, result.output | |
2021-07-11T02:17:18.8671949Z E AssertionError: | |
2021-07-11T02:17:18.8672308Z E assert 0 == 1 | |
2021-07-11T02:17:18.8673510Z E + where 1 = <Result SyntaxError("(unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \\UXXXXXXXX e...dmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\plugins_for_serve_with_get0\\hello.txt", "w") as fp:\n'))>.exit_code | |
2021-07-11T02:17:18.8674558Z | |
2021-07-11T02:17:18.8675091Z D:\a\datasette\datasette\tests\test_cli_serve_get.py:37: AssertionError | |
2021-07-11T02:17:18.8675951Z _ test_searchable[/fixtures/searchable.json?_search=te*+AND+do*&_searchmode=raw-expected_rows3] _ | |
2021-07-11T02:17:18.8676481Z | |
2021-07-11T02:17:18.8677170Z app_client = <datasette.utils.testing.TestClient object at 0x000001D1AEBF2C18> | |
2021-07-11T02:17:18.8678102Z path = '/fixtures/searchable.json?_search=te*+AND+do*&_searchmode=raw' | |
2021-07-11T02:17:18.8678830Z expected_rows = [[1, 'barry cat', 'terry dog', 'panther'], [2, 'terry dog', 'sara weasel', 'puma']] | |
2021-07-11T02:17:18.8679246Z | |
2021-07-11T02:17:18.8679673Z @pytest.mark.parametrize( | |
2021-07-11T02:17:18.8680174Z "path,expected_rows", | |
2021-07-11T02:17:18.8680542Z [ | |
2021-07-11T02:17:18.8680843Z ( | |
2021-07-11T02:17:18.8681268Z "/fixtures/searchable.json?_search=dog", | |
2021-07-11T02:17:18.8681699Z [ | |
2021-07-11T02:17:18.8682091Z [1, "barry cat", "terry dog", "panther"], | |
2021-07-11T02:17:18.8682553Z [2, "terry dog", "sara weasel", "puma"], | |
2021-07-11T02:17:18.8682925Z ], | |
2021-07-11T02:17:18.8683196Z ), | |
2021-07-11T02:17:18.8683474Z ( | |
2021-07-11T02:17:18.8683907Z # Special keyword shouldn't break FTS query | |
2021-07-11T02:17:18.8684462Z "/fixtures/searchable.json?_search=AND", | |
2021-07-11T02:17:18.8684897Z [], | |
2021-07-11T02:17:18.8685177Z ), | |
2021-07-11T02:17:18.8685446Z ( | |
2021-07-11T02:17:18.8685903Z # Without _searchmode=raw this should return no results | |
2021-07-11T02:17:18.8686595Z "/fixtures/searchable.json?_search=te*+AND+do*", | |
2021-07-11T02:17:18.8687035Z [], | |
2021-07-11T02:17:18.8687319Z ), | |
2021-07-11T02:17:18.8687586Z ( | |
2021-07-11T02:17:18.8687929Z # _searchmode=raw | |
2021-07-11T02:17:18.8688495Z "/fixtures/searchable.json?_search=te*+AND+do*&_searchmode=raw", | |
2021-07-11T02:17:18.8688988Z [ | |
2021-07-11T02:17:18.8689379Z [1, "barry cat", "terry dog", "panther"], | |
2021-07-11T02:17:18.8689853Z [2, "terry dog", "sara weasel", "puma"], | |
2021-07-11T02:17:18.8690214Z ], | |
2021-07-11T02:17:18.8690499Z ), | |
2021-07-11T02:17:18.8690802Z ( | |
2021-07-11T02:17:18.8691229Z # _searchmode=raw combined with _search_COLUMN | |
2021-07-11T02:17:18.8691890Z "/fixtures/searchable.json?_search_text2=te*&_searchmode=raw", | |
2021-07-11T02:17:18.8692392Z [ | |
2021-07-11T02:17:18.8692770Z [1, "barry cat", "terry dog", "panther"], | |
2021-07-11T02:17:18.8693143Z ], | |
2021-07-11T02:17:18.8693412Z ), | |
2021-07-11T02:17:18.8693691Z ( | |
2021-07-11T02:17:18.8694149Z "/fixtures/searchable.json?_search=weasel", | |
2021-07-11T02:17:18.8694685Z [[2, "terry dog", "sara weasel", "puma"]], | |
2021-07-11T02:17:18.8695049Z ), | |
2021-07-11T02:17:18.8695329Z ( | |
2021-07-11T02:17:18.8695769Z "/fixtures/searchable.json?_search_text2=dog", | |
2021-07-11T02:17:18.8696314Z [[1, "barry cat", "terry dog", "panther"]], | |
2021-07-11T02:17:18.8696683Z ), | |
2021-07-11T02:17:18.8696948Z ( | |
2021-07-11T02:17:18.8697472Z "/fixtures/searchable.json?_search_name%20with%20.%20and%20spaces=panther", | |
2021-07-11T02:17:18.8698145Z [[1, "barry cat", "terry dog", "panther"]], | |
2021-07-11T02:17:18.8698516Z ), | |
2021-07-11T02:17:18.8698791Z ], | |
2021-07-11T02:17:18.8699052Z ) | |
2021-07-11T02:17:18.8699505Z def test_searchable(app_client, path, expected_rows): | |
2021-07-11T02:17:18.8700069Z response = app_client.get(path) | |
2021-07-11T02:17:18.8700626Z > assert expected_rows == response.json["rows"] | |
2021-07-11T02:17:18.8701222Z E AssertionError: assert [[1, 'barry c...sel', 'puma']] == [] | |
2021-07-11T02:17:18.8701885Z E Left contains 2 more items, first extra item: [1, 'barry cat', 'terry dog', 'panther'] | |
2021-07-11T02:17:18.8702442Z E Use -v to get the full diff | |
2021-07-11T02:17:18.8702702Z | |
2021-07-11T02:17:18.8703193Z D:\a\datasette\datasette\tests\test_api.py:1062: AssertionError | |
2021-07-11T02:17:18.8703910Z _____ test_searchmode[table_metadata0-_search=te*+AND+do*-expected_rows0] _____ | |
2021-07-11T02:17:18.8704333Z | |
2021-07-11T02:17:18.8704822Z table_metadata = {}, querystring = '_search=te*+AND+do*', expected_rows = [] | |
2021-07-11T02:17:18.8705222Z | |
2021-07-11T02:17:18.8705626Z @pytest.mark.parametrize( | |
2021-07-11T02:17:18.8706326Z "table_metadata,querystring,expected_rows", | |
2021-07-11T02:17:18.8706861Z [ | |
2021-07-11T02:17:18.8707123Z ( | |
2021-07-11T02:17:18.8707409Z {}, | |
2021-07-11T02:17:18.8707755Z "_search=te*+AND+do*", | |
2021-07-11T02:17:18.8708081Z [], | |
2021-07-11T02:17:18.8708365Z ), | |
2021-07-11T02:17:18.8708631Z ( | |
2021-07-11T02:17:18.8708975Z {"searchmode": "raw"}, | |
2021-07-11T02:17:18.8709372Z "_search=te*+AND+do*", | |
2021-07-11T02:17:18.8709784Z _SEARCHMODE_RAW_RESULTS, | |
2021-07-11T02:17:18.8710147Z ), | |
2021-07-11T02:17:18.8710425Z ( | |
2021-07-11T02:17:18.8710722Z {}, | |
2021-07-11T02:17:18.8711121Z "_search=te*+AND+do*&_searchmode=raw", | |
2021-07-11T02:17:18.8711603Z _SEARCHMODE_RAW_RESULTS, | |
2021-07-11T02:17:18.8711950Z ), | |
2021-07-11T02:17:18.8712444Z # Can be over-ridden with _searchmode=escaped | |
2021-07-11T02:17:18.8712865Z ( | |
2021-07-11T02:17:18.8713209Z {"searchmode": "raw"}, | |
2021-07-11T02:17:18.8713687Z "_search=te*+AND+do*&_searchmode=escaped", | |
2021-07-11T02:17:18.8714087Z [], | |
2021-07-11T02:17:18.8714371Z ), | |
2021-07-11T02:17:18.8714649Z ], | |
2021-07-11T02:17:18.8714903Z ) | |
2021-07-11T02:17:18.8715413Z def test_searchmode(table_metadata, querystring, expected_rows): | |
2021-07-11T02:17:18.8715978Z with make_app_client( | |
2021-07-11T02:17:18.8716547Z metadata={"databases": {"fixtures": {"tables": {"searchable": table_metadata}}}} | |
2021-07-11T02:17:18.8717083Z ) as client: | |
2021-07-11T02:17:18.8717640Z response = client.get("/fixtures/searchable.json?" + querystring) | |
2021-07-11T02:17:18.8718331Z > assert expected_rows == response.json["rows"] | |
2021-07-11T02:17:18.8718674Z | |
2021-07-11T02:17:18.8719094Z D:\a\datasette\datasette\tests\test_api.py:1102: | |
2021-07-11T02:17:18.8719548Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8720123Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.8720707Z next(self.gen) | |
2021-07-11T02:17:18.8721230Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8721781Z yield TestClient(ds) | |
2021-07-11T02:17:18.8722370Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8722920Z self.cleanup() | |
2021-07-11T02:17:18.8723509Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8724162Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8724764Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8725995Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8726628Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8727295Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8727758Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8728001Z | |
2021-07-11T02:17:18.8728450Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpr0os2b85' | |
2021-07-11T02:17:18.8729098Z onerror = <function rmtree.<locals>.onerror at 0x000001D1AF06FAE8> | |
2021-07-11T02:17:18.8729475Z | |
2021-07-11T02:17:18.8729829Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8730212Z try: | |
2021-07-11T02:17:18.8730958Z if os.path.islink(path): | |
2021-07-11T02:17:18.8731525Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8732128Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8732661Z except OSError: | |
2021-07-11T02:17:18.8733143Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8733723Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8734152Z return | |
2021-07-11T02:17:18.8734452Z names = [] | |
2021-07-11T02:17:18.8734751Z try: | |
2021-07-11T02:17:18.8735100Z names = os.listdir(path) | |
2021-07-11T02:17:18.8735506Z except OSError: | |
2021-07-11T02:17:18.8735972Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8736409Z for name in names: | |
2021-07-11T02:17:18.8736852Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8737249Z try: | |
2021-07-11T02:17:18.8737626Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8738056Z except OSError: | |
2021-07-11T02:17:18.8738412Z mode = 0 | |
2021-07-11T02:17:18.8738761Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8739220Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8739619Z else: | |
2021-07-11T02:17:18.8739928Z try: | |
2021-07-11T02:17:18.8740368Z > os.unlink(fullname) | |
2021-07-11T02:17:18.8741340Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpr0os2b85\\fixtures.db' | |
2021-07-11T02:17:18.8742117Z | |
2021-07-11T02:17:18.8742681Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.8743484Z _____ test_searchmode[table_metadata1-_search=te*+AND+do*-expected_rows1] _____ | |
2021-07-11T02:17:18.8743895Z | |
2021-07-11T02:17:18.8744374Z sql_time_limit_ms = None, max_returned_rows = None, cors = False, memory = False | |
2021-07-11T02:17:18.8745093Z config = {'default_page_size': 50, 'max_returned_rows': 100, 'num_sql_threads': 1, 'sql_time_limit_ms': 200} | |
2021-07-11T02:17:18.8745809Z filename = 'fixtures.db', is_immutable = False, extra_databases = None | |
2021-07-11T02:17:18.8746470Z inspect_data = None, static_mounts = None, template_dir = None | |
2021-07-11T02:17:18.8747154Z metadata = {'databases': {'fixtures': {'tables': {'searchable': {'searchmode': 'raw'}}}}} | |
2021-07-11T02:17:18.8747679Z crossdb = False | |
2021-07-11T02:17:18.8747907Z | |
2021-07-11T02:17:18.8748342Z @contextlib.contextmanager | |
2021-07-11T02:17:18.8748843Z def make_app_client( | |
2021-07-11T02:17:18.8749220Z sql_time_limit_ms=None, | |
2021-07-11T02:17:18.8749623Z max_returned_rows=None, | |
2021-07-11T02:17:18.8749984Z cors=False, | |
2021-07-11T02:17:18.8750327Z memory=False, | |
2021-07-11T02:17:18.8750700Z config=None, | |
2021-07-11T02:17:18.8751084Z filename="fixtures.db", | |
2021-07-11T02:17:18.8751501Z is_immutable=False, | |
2021-07-11T02:17:18.8751910Z extra_databases=None, | |
2021-07-11T02:17:18.8752297Z inspect_data=None, | |
2021-07-11T02:17:18.8752764Z static_mounts=None, | |
2021-07-11T02:17:18.8753153Z template_dir=None, | |
2021-07-11T02:17:18.8753523Z metadata=None, | |
2021-07-11T02:17:18.8753887Z crossdb=False, | |
2021-07-11T02:17:18.8754187Z ): | |
2021-07-11T02:17:18.8754719Z with tempfile.TemporaryDirectory() as tmpdir: | |
2021-07-11T02:17:18.8755405Z filepath = os.path.join(tmpdir, filename) | |
2021-07-11T02:17:18.8755873Z if is_immutable: | |
2021-07-11T02:17:18.8756230Z files = [] | |
2021-07-11T02:17:18.8756625Z immutables = [filepath] | |
2021-07-11T02:17:18.8756993Z else: | |
2021-07-11T02:17:18.8757347Z files = [filepath] | |
2021-07-11T02:17:18.8757719Z immutables = [] | |
2021-07-11T02:17:18.8758176Z conn = sqlite3.connect(filepath) | |
2021-07-11T02:17:18.8758713Z conn.executescript(TABLES) | |
2021-07-11T02:17:18.8759257Z for sql, params in TABLE_PARAMETERIZED_SQL: | |
2021-07-11T02:17:18.8759712Z with conn: | |
2021-07-11T02:17:18.8760127Z conn.execute(sql, params) | |
2021-07-11T02:17:18.8760608Z if extra_databases is not None: | |
2021-07-11T02:17:18.8761193Z for extra_filename, extra_sql in extra_databases.items(): | |
2021-07-11T02:17:18.8761870Z extra_filepath = os.path.join(tmpdir, extra_filename) | |
2021-07-11T02:17:18.8762571Z sqlite3.connect(extra_filepath).executescript(extra_sql) | |
2021-07-11T02:17:18.8763245Z # Insert at start to help test /-/databases ordering: | |
2021-07-11T02:17:18.8763810Z files.insert(0, extra_filepath) | |
2021-07-11T02:17:18.8764334Z os.chdir(os.path.dirname(filepath)) | |
2021-07-11T02:17:18.8764796Z config = config or {} | |
2021-07-11T02:17:18.8765174Z for key, value in { | |
2021-07-11T02:17:18.8765560Z "default_page_size": 50, | |
2021-07-11T02:17:18.8766033Z "max_returned_rows": max_returned_rows or 100, | |
2021-07-11T02:17:18.8766548Z "sql_time_limit_ms": sql_time_limit_ms or 200, | |
2021-07-11T02:17:18.8767124Z # Default is 3 but this results in "too many open files" | |
2021-07-11T02:17:18.8767689Z # errors when running the full test suite: | |
2021-07-11T02:17:18.8768131Z "num_sql_threads": 1, | |
2021-07-11T02:17:18.8768482Z }.items(): | |
2021-07-11T02:17:18.8768837Z if key not in config: | |
2021-07-11T02:17:18.8769215Z config[key] = value | |
2021-07-11T02:17:18.8769602Z ds = Datasette( | |
2021-07-11T02:17:18.8769954Z files, | |
2021-07-11T02:17:18.8770336Z immutables=immutables, | |
2021-07-11T02:17:18.8770793Z memory=memory, | |
2021-07-11T02:17:18.8771147Z cors=cors, | |
2021-07-11T02:17:18.8771560Z metadata=metadata or METADATA, | |
2021-07-11T02:17:18.8772028Z plugins_dir=PLUGINS_DIR, | |
2021-07-11T02:17:18.8772429Z config=config, | |
2021-07-11T02:17:18.8772847Z inspect_data=inspect_data, | |
2021-07-11T02:17:18.8773304Z static_mounts=static_mounts, | |
2021-07-11T02:17:18.8773751Z template_dir=template_dir, | |
2021-07-11T02:17:18.8774177Z crossdb=crossdb, | |
2021-07-11T02:17:18.8774511Z ) | |
2021-07-11T02:17:18.8775025Z ds.sqlite_functions.append(("sleep", 1, lambda n: time.sleep(float(n)))) | |
2021-07-11T02:17:18.8775608Z > yield TestClient(ds) | |
2021-07-11T02:17:18.8775874Z | |
2021-07-11T02:17:18.8776295Z D:\a\datasette\datasette\tests\fixtures.py:156: | |
2021-07-11T02:17:18.8776774Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8777011Z | |
2021-07-11T02:17:18.8777491Z table_metadata = {'searchmode': 'raw'}, querystring = '_search=te*+AND+do*' | |
2021-07-11T02:17:18.8778193Z expected_rows = [[1, 'barry cat', 'terry dog', 'panther'], [2, 'terry dog', 'sara weasel', 'puma']] | |
2021-07-11T02:17:18.8778665Z | |
2021-07-11T02:17:18.8779083Z @pytest.mark.parametrize( | |
2021-07-11T02:17:18.8779765Z "table_metadata,querystring,expected_rows", | |
2021-07-11T02:17:18.8780303Z [ | |
2021-07-11T02:17:18.8780605Z ( | |
2021-07-11T02:17:18.8780882Z {}, | |
2021-07-11T02:17:18.8781226Z "_search=te*+AND+do*", | |
2021-07-11T02:17:18.8781566Z [], | |
2021-07-11T02:17:18.8781838Z ), | |
2021-07-11T02:17:18.8782113Z ( | |
2021-07-11T02:17:18.8782445Z {"searchmode": "raw"}, | |
2021-07-11T02:17:18.8782842Z "_search=te*+AND+do*", | |
2021-07-11T02:17:18.8783267Z _SEARCHMODE_RAW_RESULTS, | |
2021-07-11T02:17:18.8783615Z ), | |
2021-07-11T02:17:18.8783909Z ( | |
2021-07-11T02:17:18.8784195Z {}, | |
2021-07-11T02:17:18.8784584Z "_search=te*+AND+do*&_searchmode=raw", | |
2021-07-11T02:17:18.8785058Z _SEARCHMODE_RAW_RESULTS, | |
2021-07-11T02:17:18.8785426Z ), | |
2021-07-11T02:17:18.8785861Z # Can be over-ridden with _searchmode=escaped | |
2021-07-11T02:17:18.8786295Z ( | |
2021-07-11T02:17:18.8786628Z {"searchmode": "raw"}, | |
2021-07-11T02:17:18.8787107Z "_search=te*+AND+do*&_searchmode=escaped", | |
2021-07-11T02:17:18.8787523Z [], | |
2021-07-11T02:17:18.8787792Z ), | |
2021-07-11T02:17:18.8788071Z ], | |
2021-07-11T02:17:18.8788340Z ) | |
2021-07-11T02:17:18.8788835Z def test_searchmode(table_metadata, querystring, expected_rows): | |
2021-07-11T02:17:18.8789396Z with make_app_client( | |
2021-07-11T02:17:18.8789981Z metadata={"databases": {"fixtures": {"tables": {"searchable": table_metadata}}}} | |
2021-07-11T02:17:18.8790503Z ) as client: | |
2021-07-11T02:17:18.8791100Z response = client.get("/fixtures/searchable.json?" + querystring) | |
2021-07-11T02:17:18.8791779Z > assert expected_rows == response.json["rows"] | |
2021-07-11T02:17:18.8792365Z E AssertionError: assert [[1, 'barry c...sel', 'puma']] == [] | |
2021-07-11T02:17:18.8793088Z E Left contains 2 more items, first extra item: [1, 'barry cat', 'terry dog', 'panther'] | |
2021-07-11T02:17:18.8793659Z E Use -v to get the full diff | |
2021-07-11T02:17:18.8793905Z | |
2021-07-11T02:17:18.8794393Z D:\a\datasette\datasette\tests\test_api.py:1102: AssertionError | |
2021-07-11T02:17:18.8794798Z | |
2021-07-11T02:17:18.8795282Z During handling of the above exception, another exception occurred: | |
2021-07-11T02:17:18.8795696Z | |
2021-07-11T02:17:18.8796181Z table_metadata = {'searchmode': 'raw'}, querystring = '_search=te*+AND+do*' | |
2021-07-11T02:17:18.8796890Z expected_rows = [[1, 'barry cat', 'terry dog', 'panther'], [2, 'terry dog', 'sara weasel', 'puma']] | |
2021-07-11T02:17:18.8797306Z | |
2021-07-11T02:17:18.8797717Z @pytest.mark.parametrize( | |
2021-07-11T02:17:18.8798414Z "table_metadata,querystring,expected_rows", | |
2021-07-11T02:17:18.8798947Z [ | |
2021-07-11T02:17:18.8799225Z ( | |
2021-07-11T02:17:18.8799510Z {}, | |
2021-07-11T02:17:18.8799844Z "_search=te*+AND+do*", | |
2021-07-11T02:17:18.8800185Z [], | |
2021-07-11T02:17:18.8800471Z ), | |
2021-07-11T02:17:18.8800766Z ( | |
2021-07-11T02:17:18.8801112Z {"searchmode": "raw"}, | |
2021-07-11T02:17:18.8801496Z "_search=te*+AND+do*", | |
2021-07-11T02:17:18.8801921Z _SEARCHMODE_RAW_RESULTS, | |
2021-07-11T02:17:18.8802287Z ), | |
2021-07-11T02:17:18.8802558Z ( | |
2021-07-11T02:17:18.8802845Z {}, | |
2021-07-11T02:17:18.8803250Z "_search=te*+AND+do*&_searchmode=raw", | |
2021-07-11T02:17:18.8803714Z _SEARCHMODE_RAW_RESULTS, | |
2021-07-11T02:17:18.8804079Z ), | |
2021-07-11T02:17:18.8804523Z # Can be over-ridden with _searchmode=escaped | |
2021-07-11T02:17:18.8804950Z ( | |
2021-07-11T02:17:18.8805353Z {"searchmode": "raw"}, | |
2021-07-11T02:17:18.8805827Z "_search=te*+AND+do*&_searchmode=escaped", | |
2021-07-11T02:17:18.8806247Z [], | |
2021-07-11T02:17:18.8806532Z ), | |
2021-07-11T02:17:18.8806795Z ], | |
2021-07-11T02:17:18.8807064Z ) | |
2021-07-11T02:17:18.8807577Z def test_searchmode(table_metadata, querystring, expected_rows): | |
2021-07-11T02:17:18.8808126Z with make_app_client( | |
2021-07-11T02:17:18.8808707Z metadata={"databases": {"fixtures": {"tables": {"searchable": table_metadata}}}} | |
2021-07-11T02:17:18.8809242Z ) as client: | |
2021-07-11T02:17:18.8809801Z response = client.get("/fixtures/searchable.json?" + querystring) | |
2021-07-11T02:17:18.8810484Z > assert expected_rows == response.json["rows"] | |
2021-07-11T02:17:18.8810861Z | |
2021-07-11T02:17:18.8811262Z D:\a\datasette\datasette\tests\test_api.py:1102: | |
2021-07-11T02:17:18.8811726Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8812309Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:99: in __exit__ | |
2021-07-11T02:17:18.8812971Z self.gen.throw(type, value, traceback) | |
2021-07-11T02:17:18.8813611Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8814165Z yield TestClient(ds) | |
2021-07-11T02:17:18.8814735Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8815305Z self.cleanup() | |
2021-07-11T02:17:18.8815883Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8816491Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8817098Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8817710Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8818332Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8819000Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8819455Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8819680Z | |
2021-07-11T02:17:18.8820208Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpg8lfxzro' | |
2021-07-11T02:17:18.8820888Z onerror = <function rmtree.<locals>.onerror at 0x000001D1AF11C620> | |
2021-07-11T02:17:18.8821255Z | |
2021-07-11T02:17:18.8821617Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8822001Z try: | |
2021-07-11T02:17:18.8822366Z if os.path.islink(path): | |
2021-07-11T02:17:18.8822907Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8823514Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8823988Z except OSError: | |
2021-07-11T02:17:18.8824492Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8825063Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8825480Z return | |
2021-07-11T02:17:18.8825794Z names = [] | |
2021-07-11T02:17:18.8826096Z try: | |
2021-07-11T02:17:18.8826443Z names = os.listdir(path) | |
2021-07-11T02:17:18.8826846Z except OSError: | |
2021-07-11T02:17:18.8827298Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8827747Z for name in names: | |
2021-07-11T02:17:18.8828194Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8828585Z try: | |
2021-07-11T02:17:18.8828977Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8829406Z except OSError: | |
2021-07-11T02:17:18.8829750Z mode = 0 | |
2021-07-11T02:17:18.8830116Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8830602Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8831000Z else: | |
2021-07-11T02:17:18.8831308Z try: | |
2021-07-11T02:17:18.8831658Z > os.unlink(fullname) | |
2021-07-11T02:17:18.8832696Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpg8lfxzro\\fixtures.db' | |
2021-07-11T02:17:18.8833461Z | |
2021-07-11T02:17:18.8834024Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.8834877Z _ test_searchmode[table_metadata2-_search=te*+AND+do*&_searchmode=raw-expected_rows2] _ | |
2021-07-11T02:17:18.8835365Z | |
2021-07-11T02:17:18.8835839Z sql_time_limit_ms = None, max_returned_rows = None, cors = False, memory = False | |
2021-07-11T02:17:18.8836554Z config = {'default_page_size': 50, 'max_returned_rows': 100, 'num_sql_threads': 1, 'sql_time_limit_ms': 200} | |
2021-07-11T02:17:18.8837262Z filename = 'fixtures.db', is_immutable = False, extra_databases = None | |
2021-07-11T02:17:18.8837919Z inspect_data = None, static_mounts = None, template_dir = None | |
2021-07-11T02:17:18.8838534Z metadata = {'databases': {'fixtures': {'tables': {'searchable': {}}}}} | |
2021-07-11T02:17:18.8839004Z crossdb = False | |
2021-07-11T02:17:18.8839237Z | |
2021-07-11T02:17:18.8839673Z @contextlib.contextmanager | |
2021-07-11T02:17:18.8840157Z def make_app_client( | |
2021-07-11T02:17:18.8840555Z sql_time_limit_ms=None, | |
2021-07-11T02:17:18.8840981Z max_returned_rows=None, | |
2021-07-11T02:17:18.8841341Z cors=False, | |
2021-07-11T02:17:18.8841688Z memory=False, | |
2021-07-11T02:17:18.8842033Z config=None, | |
2021-07-11T02:17:18.8842415Z filename="fixtures.db", | |
2021-07-11T02:17:18.8842835Z is_immutable=False, | |
2021-07-11T02:17:18.8843229Z extra_databases=None, | |
2021-07-11T02:17:18.8843635Z inspect_data=None, | |
2021-07-11T02:17:18.8844017Z static_mounts=None, | |
2021-07-11T02:17:18.8844389Z template_dir=None, | |
2021-07-11T02:17:18.8844771Z metadata=None, | |
2021-07-11T02:17:18.8845133Z crossdb=False, | |
2021-07-11T02:17:18.8845444Z ): | |
2021-07-11T02:17:18.8845977Z with tempfile.TemporaryDirectory() as tmpdir: | |
2021-07-11T02:17:18.8846651Z filepath = os.path.join(tmpdir, filename) | |
2021-07-11T02:17:18.8847181Z if is_immutable: | |
2021-07-11T02:17:18.8847541Z files = [] | |
2021-07-11T02:17:18.8847917Z immutables = [filepath] | |
2021-07-11T02:17:18.8848295Z else: | |
2021-07-11T02:17:18.8848650Z files = [filepath] | |
2021-07-11T02:17:18.8849024Z immutables = [] | |
2021-07-11T02:17:18.8849476Z conn = sqlite3.connect(filepath) | |
2021-07-11T02:17:18.8850019Z conn.executescript(TABLES) | |
2021-07-11T02:17:18.8850591Z for sql, params in TABLE_PARAMETERIZED_SQL: | |
2021-07-11T02:17:18.8851041Z with conn: | |
2021-07-11T02:17:18.8851444Z conn.execute(sql, params) | |
2021-07-11T02:17:18.8851919Z if extra_databases is not None: | |
2021-07-11T02:17:18.8852499Z for extra_filename, extra_sql in extra_databases.items(): | |
2021-07-11T02:17:18.8853167Z extra_filepath = os.path.join(tmpdir, extra_filename) | |
2021-07-11T02:17:18.8853877Z sqlite3.connect(extra_filepath).executescript(extra_sql) | |
2021-07-11T02:17:18.8854556Z # Insert at start to help test /-/databases ordering: | |
2021-07-11T02:17:18.8855106Z files.insert(0, extra_filepath) | |
2021-07-11T02:17:18.8855647Z os.chdir(os.path.dirname(filepath)) | |
2021-07-11T02:17:18.8856111Z config = config or {} | |
2021-07-11T02:17:18.8856474Z for key, value in { | |
2021-07-11T02:17:18.8856869Z "default_page_size": 50, | |
2021-07-11T02:17:18.8857350Z "max_returned_rows": max_returned_rows or 100, | |
2021-07-11T02:17:18.8857843Z "sql_time_limit_ms": sql_time_limit_ms or 200, | |
2021-07-11T02:17:18.8858377Z # Default is 3 but this results in "too many open files" | |
2021-07-11T02:17:18.8858980Z # errors when running the full test suite: | |
2021-07-11T02:17:18.8859419Z "num_sql_threads": 1, | |
2021-07-11T02:17:18.8859770Z }.items(): | |
2021-07-11T02:17:18.8860130Z if key not in config: | |
2021-07-11T02:17:18.8860511Z config[key] = value | |
2021-07-11T02:17:18.8860920Z ds = Datasette( | |
2021-07-11T02:17:18.8861257Z files, | |
2021-07-11T02:17:18.8861656Z immutables=immutables, | |
2021-07-11T02:17:18.8862075Z memory=memory, | |
2021-07-11T02:17:18.8862420Z cors=cors, | |
2021-07-11T02:17:18.8862838Z metadata=metadata or METADATA, | |
2021-07-11T02:17:18.8863315Z plugins_dir=PLUGINS_DIR, | |
2021-07-11T02:17:18.8863715Z config=config, | |
2021-07-11T02:17:18.8864129Z inspect_data=inspect_data, | |
2021-07-11T02:17:18.8864581Z static_mounts=static_mounts, | |
2021-07-11T02:17:18.8865027Z template_dir=template_dir, | |
2021-07-11T02:17:18.8865456Z crossdb=crossdb, | |
2021-07-11T02:17:18.8865779Z ) | |
2021-07-11T02:17:18.8866310Z ds.sqlite_functions.append(("sleep", 1, lambda n: time.sleep(float(n)))) | |
2021-07-11T02:17:18.8866898Z > yield TestClient(ds) | |
2021-07-11T02:17:18.8867164Z | |
2021-07-11T02:17:18.8867581Z D:\a\datasette\datasette\tests\fixtures.py:156: | |
2021-07-11T02:17:18.8868068Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8868305Z | |
2021-07-11T02:17:18.8868768Z table_metadata = {}, querystring = '_search=te*+AND+do*&_searchmode=raw' | |
2021-07-11T02:17:18.8869482Z expected_rows = [[1, 'barry cat', 'terry dog', 'panther'], [2, 'terry dog', 'sara weasel', 'puma']] | |
2021-07-11T02:17:18.8869896Z | |
2021-07-11T02:17:18.8870311Z @pytest.mark.parametrize( | |
2021-07-11T02:17:18.8871022Z "table_metadata,querystring,expected_rows", | |
2021-07-11T02:17:18.8871556Z [ | |
2021-07-11T02:17:18.8871822Z ( | |
2021-07-11T02:17:18.8872105Z {}, | |
2021-07-11T02:17:18.8872447Z "_search=te*+AND+do*", | |
2021-07-11T02:17:18.8872841Z [], | |
2021-07-11T02:17:18.8873126Z ), | |
2021-07-11T02:17:18.8873402Z ( | |
2021-07-11T02:17:18.8873733Z {"searchmode": "raw"}, | |
2021-07-11T02:17:18.8874138Z "_search=te*+AND+do*", | |
2021-07-11T02:17:18.8874562Z _SEARCHMODE_RAW_RESULTS, | |
2021-07-11T02:17:18.8874909Z ), | |
2021-07-11T02:17:18.8875186Z ( | |
2021-07-11T02:17:18.8875464Z {}, | |
2021-07-11T02:17:18.8875868Z "_search=te*+AND+do*&_searchmode=raw", | |
2021-07-11T02:17:18.8876344Z _SEARCHMODE_RAW_RESULTS, | |
2021-07-11T02:17:18.8876692Z ), | |
2021-07-11T02:17:18.8877136Z # Can be over-ridden with _searchmode=escaped | |
2021-07-11T02:17:18.8877566Z ( | |
2021-07-11T02:17:18.8877897Z {"searchmode": "raw"}, | |
2021-07-11T02:17:18.8878383Z "_search=te*+AND+do*&_searchmode=escaped", | |
2021-07-11T02:17:18.8878797Z [], | |
2021-07-11T02:17:18.8879070Z ), | |
2021-07-11T02:17:18.8879347Z ], | |
2021-07-11T02:17:18.8879601Z ) | |
2021-07-11T02:17:18.8880114Z def test_searchmode(table_metadata, querystring, expected_rows): | |
2021-07-11T02:17:18.8880703Z with make_app_client( | |
2021-07-11T02:17:18.8881274Z metadata={"databases": {"fixtures": {"tables": {"searchable": table_metadata}}}} | |
2021-07-11T02:17:18.8881799Z ) as client: | |
2021-07-11T02:17:18.8882366Z response = client.get("/fixtures/searchable.json?" + querystring) | |
2021-07-11T02:17:18.8883039Z > assert expected_rows == response.json["rows"] | |
2021-07-11T02:17:18.8883634Z E AssertionError: assert [[1, 'barry c...sel', 'puma']] == [] | |
2021-07-11T02:17:18.8884303Z E Left contains 2 more items, first extra item: [1, 'barry cat', 'terry dog', 'panther'] | |
2021-07-11T02:17:18.8884911Z E Use -v to get the full diff | |
2021-07-11T02:17:18.8885173Z | |
2021-07-11T02:17:18.8885668Z D:\a\datasette\datasette\tests\test_api.py:1102: AssertionError | |
2021-07-11T02:17:18.8886075Z | |
2021-07-11T02:17:18.8886559Z During handling of the above exception, another exception occurred: | |
2021-07-11T02:17:18.8886979Z | |
2021-07-11T02:17:18.8887458Z table_metadata = {}, querystring = '_search=te*+AND+do*&_searchmode=raw' | |
2021-07-11T02:17:18.8888149Z expected_rows = [[1, 'barry cat', 'terry dog', 'panther'], [2, 'terry dog', 'sara weasel', 'puma']] | |
2021-07-11T02:17:18.8888563Z | |
2021-07-11T02:17:18.8888981Z @pytest.mark.parametrize( | |
2021-07-11T02:17:18.8889681Z "table_metadata,querystring,expected_rows", | |
2021-07-11T02:17:18.8890208Z [ | |
2021-07-11T02:17:18.8890482Z ( | |
2021-07-11T02:17:18.8890776Z {}, | |
2021-07-11T02:17:18.8891120Z "_search=te*+AND+do*", | |
2021-07-11T02:17:18.8891464Z [], | |
2021-07-11T02:17:18.8891735Z ), | |
2021-07-11T02:17:18.8892012Z ( | |
2021-07-11T02:17:18.8892354Z {"searchmode": "raw"}, | |
2021-07-11T02:17:18.8892740Z "_search=te*+AND+do*", | |
2021-07-11T02:17:18.8893169Z _SEARCHMODE_RAW_RESULTS, | |
2021-07-11T02:17:18.8893530Z ), | |
2021-07-11T02:17:18.8893797Z ( | |
2021-07-11T02:17:18.8894078Z {}, | |
2021-07-11T02:17:18.8894466Z "_search=te*+AND+do*&_searchmode=raw", | |
2021-07-11T02:17:18.8894948Z _SEARCHMODE_RAW_RESULTS, | |
2021-07-11T02:17:18.8895309Z ), | |
2021-07-11T02:17:18.8895739Z # Can be over-ridden with _searchmode=escaped | |
2021-07-11T02:17:18.8896174Z ( | |
2021-07-11T02:17:18.8896519Z {"searchmode": "raw"}, | |
2021-07-11T02:17:18.8896996Z "_search=te*+AND+do*&_searchmode=escaped", | |
2021-07-11T02:17:18.8897410Z [], | |
2021-07-11T02:17:18.8897694Z ), | |
2021-07-11T02:17:18.8897953Z ], | |
2021-07-11T02:17:18.8898226Z ) | |
2021-07-11T02:17:18.8898722Z def test_searchmode(table_metadata, querystring, expected_rows): | |
2021-07-11T02:17:18.8899345Z with make_app_client( | |
2021-07-11T02:17:18.8899931Z metadata={"databases": {"fixtures": {"tables": {"searchable": table_metadata}}}} | |
2021-07-11T02:17:18.8900450Z ) as client: | |
2021-07-11T02:17:18.8901046Z response = client.get("/fixtures/searchable.json?" + querystring) | |
2021-07-11T02:17:18.8901739Z > assert expected_rows == response.json["rows"] | |
2021-07-11T02:17:18.8902083Z | |
2021-07-11T02:17:18.8902486Z D:\a\datasette\datasette\tests\test_api.py:1102: | |
2021-07-11T02:17:18.8902961Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8903521Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:99: in __exit__ | |
2021-07-11T02:17:18.8904197Z self.gen.throw(type, value, traceback) | |
2021-07-11T02:17:18.8904845Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8905385Z yield TestClient(ds) | |
2021-07-11T02:17:18.8906009Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8906579Z self.cleanup() | |
2021-07-11T02:17:18.8907152Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8907774Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8908375Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8908973Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8909618Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8910284Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8910759Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8910993Z | |
2021-07-11T02:17:18.8911452Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpqky293mt' | |
2021-07-11T02:17:18.8912145Z onerror = <function rmtree.<locals>.onerror at 0x000001D1AEBACD90> | |
2021-07-11T02:17:18.8912524Z | |
2021-07-11T02:17:18.8912899Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8913282Z try: | |
2021-07-11T02:17:18.8913646Z if os.path.islink(path): | |
2021-07-11T02:17:18.8914188Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8914799Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8915273Z except OSError: | |
2021-07-11T02:17:18.8915770Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8916333Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8916760Z return | |
2021-07-11T02:17:18.8917077Z names = [] | |
2021-07-11T02:17:18.8917367Z try: | |
2021-07-11T02:17:18.8917730Z names = os.listdir(path) | |
2021-07-11T02:17:18.8918140Z except OSError: | |
2021-07-11T02:17:18.8918590Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8919046Z for name in names: | |
2021-07-11T02:17:18.8919492Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8919881Z try: | |
2021-07-11T02:17:18.8920272Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8920717Z except OSError: | |
2021-07-11T02:17:18.8921081Z mode = 0 | |
2021-07-11T02:17:18.8921446Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8921890Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8922301Z else: | |
2021-07-11T02:17:18.8922606Z try: | |
2021-07-11T02:17:18.8922958Z > os.unlink(fullname) | |
2021-07-11T02:17:18.8923907Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpqky293mt\\fixtures.db' | |
2021-07-11T02:17:18.8924683Z | |
2021-07-11T02:17:18.8925239Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.8926189Z _ test_searchmode[table_metadata3-_search=te*+AND+do*&_searchmode=escaped-expected_rows3] _ | |
2021-07-11T02:17:18.8926711Z | |
2021-07-11T02:17:18.8927082Z table_metadata = {'searchmode': 'raw'} | |
2021-07-11T02:17:18.8927673Z querystring = '_search=te*+AND+do*&_searchmode=escaped', expected_rows = [] | |
2021-07-11T02:17:18.8928094Z | |
2021-07-11T02:17:18.8928514Z @pytest.mark.parametrize( | |
2021-07-11T02:17:18.8929195Z "table_metadata,querystring,expected_rows", | |
2021-07-11T02:17:18.8929732Z [ | |
2021-07-11T02:17:18.8930011Z ( | |
2021-07-11T02:17:18.8930282Z {}, | |
2021-07-11T02:17:18.8930650Z "_search=te*+AND+do*", | |
2021-07-11T02:17:18.8930985Z [], | |
2021-07-11T02:17:18.8931252Z ), | |
2021-07-11T02:17:18.8931531Z ( | |
2021-07-11T02:17:18.8931878Z {"searchmode": "raw"}, | |
2021-07-11T02:17:18.8932265Z "_search=te*+AND+do*", | |
2021-07-11T02:17:18.8932710Z _SEARCHMODE_RAW_RESULTS, | |
2021-07-11T02:17:18.8933064Z ), | |
2021-07-11T02:17:18.8933341Z ( | |
2021-07-11T02:17:18.8933623Z {}, | |
2021-07-11T02:17:18.8934009Z "_search=te*+AND+do*&_searchmode=raw", | |
2021-07-11T02:17:18.8934483Z _SEARCHMODE_RAW_RESULTS, | |
2021-07-11T02:17:18.8934848Z ), | |
2021-07-11T02:17:18.8935282Z # Can be over-ridden with _searchmode=escaped | |
2021-07-11T02:17:18.8935718Z ( | |
2021-07-11T02:17:18.8936061Z {"searchmode": "raw"}, | |
2021-07-11T02:17:18.8936527Z "_search=te*+AND+do*&_searchmode=escaped", | |
2021-07-11T02:17:18.8936942Z [], | |
2021-07-11T02:17:18.8937212Z ), | |
2021-07-11T02:17:18.8937493Z ], | |
2021-07-11T02:17:18.8937760Z ) | |
2021-07-11T02:17:18.8938255Z def test_searchmode(table_metadata, querystring, expected_rows): | |
2021-07-11T02:17:18.8938866Z with make_app_client( | |
2021-07-11T02:17:18.8939447Z metadata={"databases": {"fixtures": {"tables": {"searchable": table_metadata}}}} | |
2021-07-11T02:17:18.8939973Z ) as client: | |
2021-07-11T02:17:18.8940542Z response = client.get("/fixtures/searchable.json?" + querystring) | |
2021-07-11T02:17:18.8941256Z > assert expected_rows == response.json["rows"] | |
2021-07-11T02:17:18.8941590Z | |
2021-07-11T02:17:18.8942004Z D:\a\datasette\datasette\tests\test_api.py:1102: | |
2021-07-11T02:17:18.8942473Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8943034Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.8943594Z next(self.gen) | |
2021-07-11T02:17:18.8944129Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8944672Z yield TestClient(ds) | |
2021-07-11T02:17:18.8945261Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8945820Z self.cleanup() | |
2021-07-11T02:17:18.8946383Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8947004Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8947600Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8948199Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8948837Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8949496Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8949939Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8950171Z | |
2021-07-11T02:17:18.8950792Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpz2co01rj' | |
2021-07-11T02:17:18.8951485Z onerror = <function rmtree.<locals>.onerror at 0x000001D1AEF1C2F0> | |
2021-07-11T02:17:18.8951866Z | |
2021-07-11T02:17:18.8952238Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8952610Z try: | |
2021-07-11T02:17:18.8952990Z if os.path.islink(path): | |
2021-07-11T02:17:18.8953608Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8954206Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8954695Z except OSError: | |
2021-07-11T02:17:18.8955196Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8955763Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8956191Z return | |
2021-07-11T02:17:18.8956508Z names = [] | |
2021-07-11T02:17:18.8956795Z try: | |
2021-07-11T02:17:18.8957157Z names = os.listdir(path) | |
2021-07-11T02:17:18.8957567Z except OSError: | |
2021-07-11T02:17:18.8958017Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8958469Z for name in names: | |
2021-07-11T02:17:18.8958904Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8959314Z try: | |
2021-07-11T02:17:18.8959707Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8960125Z except OSError: | |
2021-07-11T02:17:18.8960489Z mode = 0 | |
2021-07-11T02:17:18.8961030Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8961482Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8961895Z else: | |
2021-07-11T02:17:18.8962207Z try: | |
2021-07-11T02:17:18.8962555Z > os.unlink(fullname) | |
2021-07-11T02:17:18.8963575Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpz2co01rj\\fixtures.db' | |
2021-07-11T02:17:18.8964390Z | |
2021-07-11T02:17:18.8964985Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.8965860Z __________ test_table_filter_extra_where_disabled_if_no_sql_allowed ___________ | |
2021-07-11T02:17:18.8966280Z | |
2021-07-11T02:17:18.8966939Z def test_table_filter_extra_where_disabled_if_no_sql_allowed(): | |
2021-07-11T02:17:18.8967629Z with make_app_client(metadata={"allow_sql": {}}) as client: | |
2021-07-11T02:17:18.8968427Z response = client.get("/fixtures/facetable.json?_where=neighborhood='Dogpatch'") | |
2021-07-11T02:17:18.8969192Z assert 403 == response.status | |
2021-07-11T02:17:18.8969815Z > assert "_where= is not allowed" == response.json["error"] | |
2021-07-11T02:17:18.8970224Z | |
2021-07-11T02:17:18.8970688Z D:\a\datasette\datasette\tests\test_api.py:1249: | |
2021-07-11T02:17:18.8971211Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8971859Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.8972439Z next(self.gen) | |
2021-07-11T02:17:18.8973053Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.8973628Z yield TestClient(ds) | |
2021-07-11T02:17:18.8974279Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.8974910Z self.cleanup() | |
2021-07-11T02:17:18.8975510Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.8976198Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.8976851Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.8977475Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.8978182Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.8978906Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.8979395Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.8979656Z | |
2021-07-11T02:17:18.8980165Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp8y8zs73o' | |
2021-07-11T02:17:18.8980850Z onerror = <function rmtree.<locals>.onerror at 0x000001D1AF102F28> | |
2021-07-11T02:17:18.8981241Z | |
2021-07-11T02:17:18.8981739Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.8982204Z try: | |
2021-07-11T02:17:18.8982593Z if os.path.islink(path): | |
2021-07-11T02:17:18.8983193Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.8983864Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.8984373Z except OSError: | |
2021-07-11T02:17:18.8984945Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.8985589Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.8986027Z return | |
2021-07-11T02:17:18.8986394Z names = [] | |
2021-07-11T02:17:18.8986724Z try: | |
2021-07-11T02:17:18.8987157Z names = os.listdir(path) | |
2021-07-11T02:17:18.8987638Z except OSError: | |
2021-07-11T02:17:18.8988131Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.8988648Z for name in names: | |
2021-07-11T02:17:18.8989174Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.8989612Z try: | |
2021-07-11T02:17:18.8990054Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.8990500Z except OSError: | |
2021-07-11T02:17:18.8990940Z mode = 0 | |
2021-07-11T02:17:18.8991398Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.8991878Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.8992342Z else: | |
2021-07-11T02:17:18.8992702Z try: | |
2021-07-11T02:17:18.9015218Z > os.unlink(fullname) | |
2021-07-11T02:17:18.9016200Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp8y8zs73o\\fixtures.db' | |
2021-07-11T02:17:18.9017130Z | |
2021-07-11T02:17:18.9017699Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.9018352Z ____________________________ test_allow_facet_off _____________________________ | |
2021-07-11T02:17:18.9018620Z | |
2021-07-11T02:17:18.9018956Z def test_allow_facet_off(): | |
2021-07-11T02:17:18.9019471Z with make_app_client(config={"allow_facet": False}) as client: | |
2021-07-11T02:17:18.9020159Z assert 400 == client.get("/fixtures/facetable.json?_facet=planet_int").status | |
2021-07-11T02:17:18.9020861Z # Should not suggest any facets either: | |
2021-07-11T02:17:18.9021514Z > assert [] == client.get("/fixtures/facetable.json").json["suggested_facets"] | |
2021-07-11T02:17:18.9021956Z | |
2021-07-11T02:17:18.9022359Z D:\a\datasette\datasette\tests\test_api.py:1690: | |
2021-07-11T02:17:18.9022826Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.9023404Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.9023958Z next(self.gen) | |
2021-07-11T02:17:18.9024494Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.9025042Z yield TestClient(ds) | |
2021-07-11T02:17:18.9025631Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.9026200Z self.cleanup() | |
2021-07-11T02:17:18.9026763Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.9027389Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.9027993Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.9028587Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.9029224Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.9029890Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.9030338Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.9030604Z | |
2021-07-11T02:17:18.9031068Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpwaxyb2xi' | |
2021-07-11T02:17:18.9032313Z onerror = <function rmtree.<locals>.onerror at 0x000001D1AF0AF488> | |
2021-07-11T02:17:18.9032734Z | |
2021-07-11T02:17:18.9033110Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.9033492Z try: | |
2021-07-11T02:17:18.9033854Z if os.path.islink(path): | |
2021-07-11T02:17:18.9034396Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.9035001Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.9035471Z except OSError: | |
2021-07-11T02:17:18.9035969Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.9036533Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.9036959Z return | |
2021-07-11T02:17:18.9037272Z names = [] | |
2021-07-11T02:17:18.9037558Z try: | |
2021-07-11T02:17:18.9037923Z names = os.listdir(path) | |
2021-07-11T02:17:18.9038325Z except OSError: | |
2021-07-11T02:17:18.9038782Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.9039240Z for name in names: | |
2021-07-11T02:17:18.9039687Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.9040079Z try: | |
2021-07-11T02:17:18.9040471Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.9040918Z except OSError: | |
2021-07-11T02:17:18.9041261Z mode = 0 | |
2021-07-11T02:17:18.9041605Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.9042052Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.9042464Z else: | |
2021-07-11T02:17:18.9042774Z try: | |
2021-07-11T02:17:18.9043120Z > os.unlink(fullname) | |
2021-07-11T02:17:18.9044081Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpwaxyb2xi\\fixtures.db' | |
2021-07-11T02:17:18.9044929Z | |
2021-07-11T02:17:18.9045491Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.9046145Z ___________________________ test_suggest_facets_off ___________________________ | |
2021-07-11T02:17:18.9046437Z | |
2021-07-11T02:17:18.9046787Z def test_suggest_facets_off(): | |
2021-07-11T02:17:18.9047317Z with make_app_client(config={"suggest_facets": False}) as client: | |
2021-07-11T02:17:18.9047873Z # Now suggested_facets should be [] | |
2021-07-11T02:17:18.9048510Z > assert [] == client.get("/fixtures/facetable.json").json["suggested_facets"] | |
2021-07-11T02:17:18.9048952Z | |
2021-07-11T02:17:18.9049354Z D:\a\datasette\datasette\tests\test_api.py:1696: | |
2021-07-11T02:17:18.9049823Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.9050386Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.9050985Z next(self.gen) | |
2021-07-11T02:17:18.9051526Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.9052069Z yield TestClient(ds) | |
2021-07-11T02:17:18.9052662Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.9053230Z self.cleanup() | |
2021-07-11T02:17:18.9053798Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.9054421Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.9055022Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.9055616Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.9056253Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.9056918Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.9057364Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.9057601Z | |
2021-07-11T02:17:18.9058065Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpslr3iq0d' | |
2021-07-11T02:17:18.9058751Z onerror = <function rmtree.<locals>.onerror at 0x000001D1AF146488> | |
2021-07-11T02:17:18.9059123Z | |
2021-07-11T02:17:18.9059493Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.9059873Z try: | |
2021-07-11T02:17:18.9060237Z if os.path.islink(path): | |
2021-07-11T02:17:18.9060804Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.9061410Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.9061881Z except OSError: | |
2021-07-11T02:17:18.9062374Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.9062932Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.9063358Z return | |
2021-07-11T02:17:18.9063673Z names = [] | |
2021-07-11T02:17:18.9063960Z try: | |
2021-07-11T02:17:18.9064325Z names = os.listdir(path) | |
2021-07-11T02:17:18.9064727Z except OSError: | |
2021-07-11T02:17:18.9065185Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.9065640Z for name in names: | |
2021-07-11T02:17:18.9066081Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.9066468Z try: | |
2021-07-11T02:17:18.9066858Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.9067277Z except OSError: | |
2021-07-11T02:17:18.9067635Z mode = 0 | |
2021-07-11T02:17:18.9067995Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.9068442Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.9068857Z else: | |
2021-07-11T02:17:18.9069165Z try: | |
2021-07-11T02:17:18.9069505Z > os.unlink(fullname) | |
2021-07-11T02:17:18.9070447Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpslr3iq0d\\fixtures.db' | |
2021-07-11T02:17:18.9071292Z | |
2021-07-11T02:17:18.9071854Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.9072520Z ________________________ test_config_force_https_urls _________________________ | |
2021-07-11T02:17:18.9072820Z | |
2021-07-11T02:17:18.9073163Z def test_config_force_https_urls(): | |
2021-07-11T02:17:18.9073720Z with make_app_client(config={"force_https_urls": True}) as client: | |
2021-07-11T02:17:18.9074422Z response = client.get("/fixtures/facetable.json?_size=3&_facet=state") | |
2021-07-11T02:17:18.9075129Z assert response.json["next_url"].startswith("https://") | |
2021-07-11T02:17:18.9075780Z assert response.json["facet_results"]["state"]["results"][0][ | |
2021-07-11T02:17:18.9076264Z "toggle_url" | |
2021-07-11T02:17:18.9076651Z ].startswith("https://") | |
2021-07-11T02:17:18.9077269Z assert response.json["suggested_facets"][0]["toggle_url"].startswith("https://") | |
2021-07-11T02:17:18.9078030Z # Also confirm that request.url and request.scheme are set correctly | |
2021-07-11T02:17:18.9078637Z response = client.get("/") | |
2021-07-11T02:17:18.9079250Z assert client.ds._last_request.url.startswith("https://") | |
2021-07-11T02:17:18.9079925Z > assert client.ds._last_request.scheme == "https" | |
2021-07-11T02:17:18.9080289Z | |
2021-07-11T02:17:18.9080731Z D:\a\datasette\datasette\tests\test_api.py:1869: | |
2021-07-11T02:17:18.9081201Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.9081757Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.9082322Z next(self.gen) | |
2021-07-11T02:17:18.9082857Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.9083397Z yield TestClient(ds) | |
2021-07-11T02:17:18.9083985Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.9084535Z self.cleanup() | |
2021-07-11T02:17:18.9085170Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.9085796Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.9086380Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.9086985Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.9087624Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.9088276Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.9088746Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.9088982Z | |
2021-07-11T02:17:18.9089447Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpb4rxb9g5' | |
2021-07-11T02:17:18.9090079Z onerror = <function rmtree.<locals>.onerror at 0x000001D1AF1D4510> | |
2021-07-11T02:17:18.9090450Z | |
2021-07-11T02:17:18.9090845Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.9091216Z try: | |
2021-07-11T02:17:18.9091591Z if os.path.islink(path): | |
2021-07-11T02:17:18.9092133Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.9092726Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.9093204Z except OSError: | |
2021-07-11T02:17:18.9093698Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.9094252Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.9094673Z return | |
2021-07-11T02:17:18.9094972Z names = [] | |
2021-07-11T02:17:18.9095269Z try: | |
2021-07-11T02:17:18.9095627Z names = os.listdir(path) | |
2021-07-11T02:17:18.9096018Z except OSError: | |
2021-07-11T02:17:18.9096481Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.9096926Z for name in names: | |
2021-07-11T02:17:18.9097412Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.9097815Z try: | |
2021-07-11T02:17:18.9098211Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.9098630Z except OSError: | |
2021-07-11T02:17:18.9098986Z mode = 0 | |
2021-07-11T02:17:18.9099335Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.9099798Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.9100208Z else: | |
2021-07-11T02:17:18.9100504Z try: | |
2021-07-11T02:17:18.9100888Z > os.unlink(fullname) | |
2021-07-11T02:17:18.9101833Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpb4rxb9g5\\fixtures.db' | |
2021-07-11T02:17:18.9102595Z | |
2021-07-11T02:17:18.9103137Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.9103778Z ______________________________ test_trace[True] _______________________________ | |
2021-07-11T02:17:18.9104047Z | |
2021-07-11T02:17:18.9104339Z trace_debug = True | |
2021-07-11T02:17:18.9104569Z | |
2021-07-11T02:17:18.9105072Z @pytest.mark.parametrize("trace_debug", (True, False)) | |
2021-07-11T02:17:18.9105646Z def test_trace(trace_debug): | |
2021-07-11T02:17:18.9106177Z with make_app_client(config={"trace_debug": trace_debug}) as client: | |
2021-07-11T02:17:18.9106864Z response = client.get("/fixtures/simple_primary_key.json?_trace=1") | |
2021-07-11T02:17:18.9107459Z > assert response.status == 200 | |
2021-07-11T02:17:18.9107743Z | |
2021-07-11T02:17:18.9108154Z D:\a\datasette\datasette\tests\test_api.py:1899: | |
2021-07-11T02:17:18.9108621Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.9109179Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.9109740Z next(self.gen) | |
2021-07-11T02:17:18.9110278Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.9110848Z yield TestClient(ds) | |
2021-07-11T02:17:18.9111479Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.9112048Z self.cleanup() | |
2021-07-11T02:17:18.9112612Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.9113236Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.9113841Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.9114442Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.9115076Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.9115728Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.9116193Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.9116426Z | |
2021-07-11T02:17:18.9116892Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpbekge2i3' | |
2021-07-11T02:17:18.9117538Z onerror = <function rmtree.<locals>.onerror at 0x000001D1AF282B70> | |
2021-07-11T02:17:18.9117907Z | |
2021-07-11T02:17:18.9118282Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.9118653Z try: | |
2021-07-11T02:17:18.9119033Z if os.path.islink(path): | |
2021-07-11T02:17:18.9119570Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.9120163Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.9120675Z except OSError: | |
2021-07-11T02:17:18.9121175Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.9121733Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.9122157Z return | |
2021-07-11T02:17:18.9122468Z names = [] | |
2021-07-11T02:17:18.9122754Z try: | |
2021-07-11T02:17:18.9123118Z names = os.listdir(path) | |
2021-07-11T02:17:18.9123508Z except OSError: | |
2021-07-11T02:17:18.9124028Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.9124475Z for name in names: | |
2021-07-11T02:17:18.9124911Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.9125311Z try: | |
2021-07-11T02:17:18.9125701Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.9126117Z except OSError: | |
2021-07-11T02:17:18.9126469Z mode = 0 | |
2021-07-11T02:17:18.9126832Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.9127277Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.9127684Z else: | |
2021-07-11T02:17:18.9127978Z try: | |
2021-07-11T02:17:18.9128333Z > os.unlink(fullname) | |
2021-07-11T02:17:18.9129292Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpbekge2i3\\fixtures.db' | |
2021-07-11T02:17:18.9130066Z | |
2021-07-11T02:17:18.9130629Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.9131283Z ______________________________ test_trace[False] ______________________________ | |
2021-07-11T02:17:18.9131554Z | |
2021-07-11T02:17:18.9131862Z trace_debug = False | |
2021-07-11T02:17:18.9132084Z | |
2021-07-11T02:17:18.9132603Z @pytest.mark.parametrize("trace_debug", (True, False)) | |
2021-07-11T02:17:18.9133177Z def test_trace(trace_debug): | |
2021-07-11T02:17:18.9133704Z with make_app_client(config={"trace_debug": trace_debug}) as client: | |
2021-07-11T02:17:18.9134386Z response = client.get("/fixtures/simple_primary_key.json?_trace=1") | |
2021-07-11T02:17:18.9134993Z > assert response.status == 200 | |
2021-07-11T02:17:18.9135276Z | |
2021-07-11T02:17:18.9135688Z D:\a\datasette\datasette\tests\test_api.py:1899: | |
2021-07-11T02:17:18.9136155Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.9136717Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.9137277Z next(self.gen) | |
2021-07-11T02:17:18.9137863Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.9138410Z yield TestClient(ds) | |
2021-07-11T02:17:18.9138998Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.9139563Z self.cleanup() | |
2021-07-11T02:17:18.9140125Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.9140757Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.9141344Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.9141935Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.9142562Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.9143219Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.9143666Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.9143905Z | |
2021-07-11T02:17:18.9144364Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp5kyaq4tc' | |
2021-07-11T02:17:18.9145000Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B05DB730> | |
2021-07-11T02:17:18.9145368Z | |
2021-07-11T02:17:18.9145734Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.9146115Z try: | |
2021-07-11T02:17:18.9146477Z if os.path.islink(path): | |
2021-07-11T02:17:18.9147017Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.9147610Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.9148095Z except OSError: | |
2021-07-11T02:17:18.9148589Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.9149145Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.9149566Z return | |
2021-07-11T02:17:18.9149880Z names = [] | |
2021-07-11T02:17:18.9150229Z try: | |
2021-07-11T02:17:18.9150610Z names = os.listdir(path) | |
2021-07-11T02:17:18.9151014Z except OSError: | |
2021-07-11T02:17:18.9151468Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.9151917Z for name in names: | |
2021-07-11T02:17:18.9152344Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.9152742Z try: | |
2021-07-11T02:17:18.9153130Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.9153545Z except OSError: | |
2021-07-11T02:17:18.9153900Z mode = 0 | |
2021-07-11T02:17:18.9154261Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.9154706Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.9155111Z else: | |
2021-07-11T02:17:18.9155417Z try: | |
2021-07-11T02:17:18.9155758Z > os.unlink(fullname) | |
2021-07-11T02:17:18.9156701Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp5kyaq4tc\\fixtures.db' | |
2021-07-11T02:17:18.9157470Z | |
2021-07-11T02:17:18.9158029Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.9158793Z ________ test_serve_with_inspect_file_prepopulates_table_counts_cache _________ | |
2021-07-11T02:17:18.9159178Z | |
2021-07-11T02:17:18.9159663Z def test_serve_with_inspect_file_prepopulates_table_counts_cache(): | |
2021-07-11T02:17:18.9160312Z inspect_data = {"fixtures": {"tables": {"hithere": {"count": 44}}}} | |
2021-07-11T02:17:18.9161001Z with make_app_client(inspect_data=inspect_data, is_immutable=True) as client: | |
2021-07-11T02:17:18.9161681Z assert inspect_data == client.ds.inspect_data | |
2021-07-11T02:17:18.9162282Z db = client.ds.databases["fixtures"] | |
2021-07-11T02:17:18.9162824Z > assert {"hithere": 44} == db.cached_table_counts | |
2021-07-11T02:17:18.9163142Z | |
2021-07-11T02:17:18.9163550Z D:\a\datasette\datasette\tests\test_cli.py:62: | |
2021-07-11T02:17:18.9164045Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.9164621Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:18.9165178Z next(self.gen) | |
2021-07-11T02:17:18.9165697Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:18.9166254Z yield TestClient(ds) | |
2021-07-11T02:17:18.9166833Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:18.9167385Z self.cleanup() | |
2021-07-11T02:17:18.9167966Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:18.9168583Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:18.9169165Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:18.9169770Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:18.9170405Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:18.9171079Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:18.9171538Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:18.9171775Z | |
2021-07-11T02:17:18.9172204Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmplu_g7zk0' | |
2021-07-11T02:17:18.9172845Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B2BB40D0> | |
2021-07-11T02:17:18.9173213Z | |
2021-07-11T02:17:18.9173578Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:18.9173939Z try: | |
2021-07-11T02:17:18.9174304Z if os.path.islink(path): | |
2021-07-11T02:17:18.9174844Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:18.9175443Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:18.9175926Z except OSError: | |
2021-07-11T02:17:18.9176404Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:18.9177514Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:18.9177937Z return | |
2021-07-11T02:17:18.9178246Z names = [] | |
2021-07-11T02:17:18.9178544Z try: | |
2021-07-11T02:17:18.9178903Z names = os.listdir(path) | |
2021-07-11T02:17:18.9179292Z except OSError: | |
2021-07-11T02:17:18.9179754Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:18.9180209Z for name in names: | |
2021-07-11T02:17:18.9180669Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:18.9181072Z try: | |
2021-07-11T02:17:18.9181448Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:18.9181877Z except OSError: | |
2021-07-11T02:17:18.9182232Z mode = 0 | |
2021-07-11T02:17:18.9182578Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:18.9183033Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:18.9183444Z else: | |
2021-07-11T02:17:18.9183742Z try: | |
2021-07-11T02:17:18.9184098Z > os.unlink(fullname) | |
2021-07-11T02:17:18.9185041Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmplu_g7zk0\\fixtures.db' | |
2021-07-11T02:17:18.9185793Z | |
2021-07-11T02:17:18.9186334Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:18.9187154Z _ test_spatialite_error_if_attempt_to_open_spatialite[spatialite_paths1-True] _ | |
2021-07-11T02:17:18.9187612Z | |
2021-07-11T02:17:18.9188022Z ensure_eventloop = None, spatialite_paths = ['/tmp'] | |
2021-07-11T02:17:18.9188563Z should_suggest_load_extension = True | |
2021-07-11T02:17:18.9188858Z | |
2021-07-11T02:17:18.9189265Z @pytest.mark.parametrize( | |
2021-07-11T02:17:18.9189868Z "spatialite_paths,should_suggest_load_extension", | |
2021-07-11T02:17:18.9190316Z ( | |
2021-07-11T02:17:18.9190629Z ([], False), | |
2021-07-11T02:17:18.9190961Z (["/tmp"], True), | |
2021-07-11T02:17:18.9191265Z ), | |
2021-07-11T02:17:18.9191518Z ) | |
2021-07-11T02:17:18.9192037Z def test_spatialite_error_if_attempt_to_open_spatialite( | |
2021-07-11T02:17:18.9192735Z ensure_eventloop, spatialite_paths, should_suggest_load_extension | |
2021-07-11T02:17:18.9193225Z ): | |
2021-07-11T02:17:18.9193839Z with mock.patch("datasette.utils.SPATIALITE_PATHS", spatialite_paths): | |
2021-07-11T02:17:18.9194494Z runner = CliRunner() | |
2021-07-11T02:17:18.9194929Z result = runner.invoke( | |
2021-07-11T02:17:18.9195518Z cli, ["serve", str(pathlib.Path(__file__).parent / "spatialite.db")] | |
2021-07-11T02:17:18.9195994Z ) | |
2021-07-11T02:17:18.9196365Z assert result.exit_code != 0 | |
2021-07-11T02:17:18.9196968Z assert "It looks like you're trying to load a SpatiaLite" in result.output | |
2021-07-11T02:17:18.9197636Z suggestion = "--load-extension=spatialite" | |
2021-07-11T02:17:18.9198192Z if should_suggest_load_extension: | |
2021-07-11T02:17:18.9198712Z > assert suggestion in result.output | |
2021-07-11T02:17:18.9200110Z E assert '--load-extension=spatialite' in "Usage: cli serve [OPTIONS] [FILES]...\nTry 'cli serve --help' for help.\n\nError: It looks like you're trying to load...abase without first loading the SpatiaLite module.\n\nRead more: https://docs.datasette.io/en/stable/spatialite.html\n" | |
2021-07-11T02:17:18.9202329Z E + where "Usage: cli serve [OPTIONS] [FILES]...\nTry 'cli serve --help' for help.\n\nError: It looks like you're trying to load...abase without first loading the SpatiaLite module.\n\nRead more: https://docs.datasette.io/en/stable/spatialite.html\n" = <Result SystemExit(2,)>.output | |
2021-07-11T02:17:18.9203445Z | |
2021-07-11T02:17:18.9203941Z D:\a\datasette\datasette\tests\test_cli.py:84: AssertionError | |
2021-07-11T02:17:18.9204541Z _________________________________ test_static _________________________________ | |
2021-07-11T02:17:18.9204804Z | |
2021-07-11T02:17:18.9205501Z config_dir_client = <datasette.utils.testing.TestClient object at 0x000001D1B2C49518> | |
2021-07-11T02:17:18.9206105Z | |
2021-07-11T02:17:18.9206446Z def test_static(config_dir_client): | |
2021-07-11T02:17:18.9206989Z response = config_dir_client.get("/static/hello.css") | |
2021-07-11T02:17:18.9207530Z assert 200 == response.status | |
2021-07-11T02:17:18.9207985Z > assert CSS == response.text | |
2021-07-11T02:17:18.9208608Z E AssertionError: assert '\nbody { margin-top: 3em}\n' == '\r\nbody { m...top: 3em}\r\n' | |
2021-07-11T02:17:18.9209117Z E - | |
2021-07-11T02:17:18.9209315Z | |
2021-07-11T02:17:18.9209567Z E + | |
2021-07-11T02:17:18.9209912Z E - body { margin-top: 3em} | |
2021-07-11T02:17:18.9210176Z | |
2021-07-11T02:17:18.9210446Z E ? - | |
2021-07-11T02:17:18.9212630Z E + body { margin-top: 3em} | |
2021-07-11T02:17:18.9212911Z | |
2021-07-11T02:17:18.9213416Z D:\a\datasette\datasette\tests\test_config_dir.py:122: AssertionError | |
2021-07-11T02:17:18.9214046Z _________________________ test_custom_pages_view_name _________________________ | |
2021-07-11T02:17:18.9214345Z | |
2021-07-11T02:17:18.9215048Z custom_pages_client = <datasette.utils.testing.TestClient object at 0x000001D1B1904C18> | |
2021-07-11T02:17:18.9215649Z | |
2021-07-11T02:17:18.9216079Z def test_custom_pages_view_name(custom_pages_client): | |
2021-07-11T02:17:18.9216655Z response = custom_pages_client.get("/about") | |
2021-07-11T02:17:18.9217157Z > assert 200 == response.status | |
2021-07-11T02:17:18.9217553Z E assert 200 == 404 | |
2021-07-11T02:17:18.9218311Z E + where 404 = <datasette.utils.testing.TestResponse object at 0x000001D1B19BD780>.status | |
2021-07-11T02:17:18.9218948Z | |
2021-07-11T02:17:18.9219463Z D:\a\datasette\datasette\tests\test_custom_pages.py:24: AssertionError | |
2021-07-11T02:17:18.9220106Z __________________________ test_request_is_available __________________________ | |
2021-07-11T02:17:18.9220412Z | |
2021-07-11T02:17:18.9221232Z custom_pages_client = <datasette.utils.testing.TestClient object at 0x000001D1B1904C18> | |
2021-07-11T02:17:18.9221856Z | |
2021-07-11T02:17:18.9222286Z def test_request_is_available(custom_pages_client): | |
2021-07-11T02:17:18.9222873Z response = custom_pages_client.get("/request") | |
2021-07-11T02:17:18.9223384Z > assert 200 == response.status | |
2021-07-11T02:17:18.9223779Z E assert 200 == 404 | |
2021-07-11T02:17:18.9224527Z E + where 404 = <datasette.utils.testing.TestResponse object at 0x000001D1B19AD588>.status | |
2021-07-11T02:17:18.9225162Z | |
2021-07-11T02:17:18.9225680Z D:\a\datasette\datasette\tests\test_custom_pages.py:30: AssertionError | |
2021-07-11T02:17:18.9226317Z _______________________ test_custom_pages_with_base_url _______________________ | |
2021-07-11T02:17:18.9226621Z | |
2021-07-11T02:17:18.9227337Z custom_pages_client_with_base_url = <datasette.utils.testing.TestClient object at 0x000001D1B5001208> | |
2021-07-11T02:17:18.9227981Z | |
2021-07-11T02:17:18.9228448Z def test_custom_pages_with_base_url(custom_pages_client_with_base_url): | |
2021-07-11T02:17:18.9229117Z response = custom_pages_client_with_base_url.get("/prefix/request") | |
2021-07-11T02:17:18.9229694Z > assert 200 == response.status | |
2021-07-11T02:17:18.9230093Z E assert 200 == 404 | |
2021-07-11T02:17:18.9230850Z E + where 404 = <datasette.utils.testing.TestResponse object at 0x000001D1B5001940>.status | |
2021-07-11T02:17:18.9231478Z | |
2021-07-11T02:17:18.9231996Z D:\a\datasette\datasette\tests\test_custom_pages.py:36: AssertionError | |
2021-07-11T02:17:18.9232635Z __________________________ test_custom_pages_nested ___________________________ | |
2021-07-11T02:17:18.9232930Z | |
2021-07-11T02:17:18.9233617Z custom_pages_client = <datasette.utils.testing.TestClient object at 0x000001D1B1904C18> | |
2021-07-11T02:17:18.9234223Z | |
2021-07-11T02:17:18.9234627Z def test_custom_pages_nested(custom_pages_client): | |
2021-07-11T02:17:18.9235271Z response = custom_pages_client.get("/nested/nest") | |
2021-07-11T02:17:18.9235805Z > assert 200 == response.status | |
2021-07-11T02:17:18.9236195Z E assert 200 == 404 | |
2021-07-11T02:17:18.9236957Z E + where 404 = <datasette.utils.testing.TestResponse object at 0x000001D1B4FFEC50>.status | |
2021-07-11T02:17:18.9237605Z | |
2021-07-11T02:17:18.9238129Z D:\a\datasette\datasette\tests\test_custom_pages.py:42: AssertionError | |
2021-07-11T02:17:18.9238726Z _____________________________ test_custom_status ______________________________ | |
2021-07-11T02:17:18.9239004Z | |
2021-07-11T02:17:18.9239699Z custom_pages_client = <datasette.utils.testing.TestClient object at 0x000001D1B1904C18> | |
2021-07-11T02:17:18.9240318Z | |
2021-07-11T02:17:18.9240721Z def test_custom_status(custom_pages_client): | |
2021-07-11T02:17:18.9241253Z response = custom_pages_client.get("/202") | |
2021-07-11T02:17:18.9241751Z > assert 202 == response.status | |
2021-07-11T02:17:18.9242137Z E assert 202 == 404 | |
2021-07-11T02:17:18.9242888Z E + where 404 = <datasette.utils.testing.TestResponse object at 0x000001D1B50189E8>.status | |
2021-07-11T02:17:18.9243514Z | |
2021-07-11T02:17:18.9244021Z D:\a\datasette\datasette\tests\test_custom_pages.py:50: AssertionError | |
2021-07-11T02:17:18.9244638Z _____________________________ test_custom_headers _____________________________ | |
2021-07-11T02:17:18.9244922Z | |
2021-07-11T02:17:18.9245616Z custom_pages_client = <datasette.utils.testing.TestClient object at 0x000001D1B1904C18> | |
2021-07-11T02:17:18.9246212Z | |
2021-07-11T02:17:18.9246609Z def test_custom_headers(custom_pages_client): | |
2021-07-11T02:17:18.9247171Z response = custom_pages_client.get("/headers") | |
2021-07-11T02:17:18.9247686Z > assert 200 == response.status | |
2021-07-11T02:17:18.9248081Z E assert 200 == 404 | |
2021-07-11T02:17:18.9248832Z E + where 404 = <datasette.utils.testing.TestResponse object at 0x000001D1B5001DA0>.status | |
2021-07-11T02:17:18.9249467Z | |
2021-07-11T02:17:18.9249970Z D:\a\datasette\datasette\tests\test_custom_pages.py:56: AssertionError | |
2021-07-11T02:17:18.9250680Z __________________________ test_custom_content_type ___________________________ | |
2021-07-11T02:17:18.9250975Z | |
2021-07-11T02:17:18.9251660Z custom_pages_client = <datasette.utils.testing.TestClient object at 0x000001D1B1904C18> | |
2021-07-11T02:17:18.9252265Z | |
2021-07-11T02:17:18.9252677Z def test_custom_content_type(custom_pages_client): | |
2021-07-11T02:17:18.9253235Z response = custom_pages_client.get("/atom") | |
2021-07-11T02:17:18.9253726Z > assert 200 == response.status | |
2021-07-11T02:17:18.9254125Z E assert 200 == 404 | |
2021-07-11T02:17:18.9254879Z E + where 404 = <datasette.utils.testing.TestResponse object at 0x000001D1B4FBBBE0>.status | |
2021-07-11T02:17:18.9255525Z | |
2021-07-11T02:17:18.9256046Z D:\a\datasette\datasette\tests\test_custom_pages.py:64: AssertionError | |
2021-07-11T02:17:18.9256651Z ________________________________ test_redirect ________________________________ | |
2021-07-11T02:17:18.9256931Z | |
2021-07-11T02:17:18.9257614Z custom_pages_client = <datasette.utils.testing.TestClient object at 0x000001D1B1904C18> | |
2021-07-11T02:17:18.9258225Z | |
2021-07-11T02:17:18.9258612Z def test_redirect(custom_pages_client): | |
2021-07-11T02:17:18.9259234Z response = custom_pages_client.get("/redirect", allow_redirects=False) | |
2021-07-11T02:17:18.9259835Z > assert 302 == response.status | |
2021-07-11T02:17:18.9260242Z E assert 302 == 404 | |
2021-07-11T02:17:18.9261019Z E + where 404 = <datasette.utils.testing.TestResponse object at 0x000001D1B4FD5C50>.status | |
2021-07-11T02:17:18.9261664Z | |
2021-07-11T02:17:18.9262182Z D:\a\datasette\datasette\tests\test_custom_pages.py:71: AssertionError | |
2021-07-11T02:17:18.9262779Z _______________________________ test_redirect2 ________________________________ | |
2021-07-11T02:17:18.9263054Z | |
2021-07-11T02:17:18.9263745Z custom_pages_client = <datasette.utils.testing.TestClient object at 0x000001D1B1904C18> | |
2021-07-11T02:17:18.9264409Z | |
2021-07-11T02:17:18.9264792Z def test_redirect2(custom_pages_client): | |
2021-07-11T02:17:18.9265439Z response = custom_pages_client.get("/redirect2", allow_redirects=False) | |
2021-07-11T02:17:18.9266051Z > assert 301 == response.status | |
2021-07-11T02:17:18.9266438Z E assert 301 == 404 | |
2021-07-11T02:17:18.9267201Z E + where 404 = <datasette.utils.testing.TestResponse object at 0x000001D1B4FA1080>.status | |
2021-07-11T02:17:18.9267835Z | |
2021-07-11T02:17:18.9268355Z D:\a\datasette\datasette\tests\test_custom_pages.py:77: AssertionError | |
2021-07-11T02:17:18.9268987Z ____________________ test_json_array_with_blanks_and_nulls ____________________ | |
2021-07-11T02:17:18.9269294Z | |
2021-07-11T02:17:18.9269658Z @pytest.mark.asyncio | |
2021-07-11T02:17:18.9270144Z async def test_json_array_with_blanks_and_nulls(): | |
2021-07-11T02:17:18.9270652Z ds = Datasette([], memory=True) | |
2021-07-11T02:17:18.9271201Z db = ds.add_database(Database(ds, memory_name="test_json_array")) | |
2021-07-11T02:17:18.9271858Z await db.execute_write("create table foo(json_column text)", block=True) | |
2021-07-11T02:17:18.9272423Z for value in ('["a", "b", "c"]', '["a", "b"]', "", None): | |
2021-07-11T02:17:18.9272862Z await db.execute_write( | |
2021-07-11T02:17:18.9273370Z "insert into foo (json_column) values (?)", [value], block=True | |
2021-07-11T02:17:18.9273797Z ) | |
2021-07-11T02:17:18.9274269Z response = await ds.client.get("/test_json_array/foo.json") | |
2021-07-11T02:17:18.9274792Z data = response.json() | |
2021-07-11T02:17:18.9275238Z > assert data["suggested_facets"] == [ | |
2021-07-11T02:17:18.9275605Z { | |
2021-07-11T02:17:18.9275930Z "name": "json_column", | |
2021-07-11T02:17:18.9276301Z "type": "array", | |
2021-07-11T02:17:18.9276886Z "toggle_url": "http://localhost/test_json_array/foo.json?_facet_array=json_column", | |
2021-07-11T02:17:18.9277427Z } | |
2021-07-11T02:17:18.9277705Z ] | |
2021-07-11T02:17:18.9278182Z E AssertionError: assert [] == [{'name': 'js...pe': 'array'}] | |
2021-07-11T02:17:18.9279058Z E Right contains one more item: {'name': 'json_column', 'toggle_url': 'http://localhost/test_json_array/foo.json?_facet_array=json_column', 'type': 'array'} | |
2021-07-11T02:17:18.9279819Z E Use -v to get the full diff | |
2021-07-11T02:17:18.9280075Z | |
2021-07-11T02:17:18.9280909Z D:\a\datasette\datasette\tests\test_facets.py:343: AssertionError | |
2021-07-11T02:17:18.9281674Z _________ test_build_where[args14-expected_where14-expected_params14] _________ | |
2021-07-11T02:17:18.9282108Z | |
2021-07-11T02:17:18.9282537Z args = (('Availability+Info__arraycontains', 'yes'),) | |
2021-07-11T02:17:18.9331679Z expected_where = ['rowid in (\n select table.rowid from table, json_each([table].[Availability+Info]) j\n where j.value = :p0\n )'] | |
2021-07-11T02:17:18.9341379Z expected_params = ['yes'] | |
2021-07-11T02:17:18.9341924Z | |
2021-07-11T02:17:18.9343757Z @pytest.mark.parametrize( | |
2021-07-11T02:17:18.9345888Z "args,expected_where,expected_params", | |
2021-07-11T02:17:18.9350311Z [ | |
2021-07-11T02:17:18.9351022Z ((("name_english__contains", "foo"),), ['"name_english" like :p0'], ["%foo%"]), | |
2021-07-11T02:17:18.9351918Z ( | |
2021-07-11T02:17:18.9835122Z (("foo", "bar"), ("bar__contains", "baz")), | |
2021-07-11T02:17:18.9835929Z ['"bar" like :p0', '"foo" = :p1'], | |
2021-07-11T02:17:18.9836311Z ["%baz%", "bar"], | |
2021-07-11T02:17:18.9836606Z ), | |
2021-07-11T02:17:18.9836888Z ( | |
2021-07-11T02:17:18.9837305Z (("foo__startswith", "bar"), ("bar__endswith", "baz")), | |
2021-07-11T02:17:18.9837772Z ['"bar" like :p0', '"foo" like :p1'], | |
2021-07-11T02:17:18.9838152Z ["%baz", "bar%"], | |
2021-07-11T02:17:18.9838718Z ), | |
2021-07-11T02:17:18.9838986Z ( | |
2021-07-11T02:17:18.9840368Z (("foo__lt", "1"), ("bar__gt", "2"), ("baz__gte", "3"), ("bax__lte", "4")), | |
2021-07-11T02:17:19.0037052Z ['"bar" > :p0', '"bax" <= :p1', '"baz" >= :p2', '"foo" < :p3'], | |
2021-07-11T02:17:19.0131515Z [2, 4, 3, 1], | |
2021-07-11T02:17:19.0131959Z ), | |
2021-07-11T02:17:19.0132239Z ( | |
2021-07-11T02:17:19.0132601Z (("foo__like", "2%2"), ("zax__glob", "3*")), | |
2021-07-11T02:17:19.0133037Z ['"foo" like :p0', '"zax" glob :p1'], | |
2021-07-11T02:17:19.0133424Z ["2%2", "3*"], | |
2021-07-11T02:17:19.0133720Z ), | |
2021-07-11T02:17:19.0145150Z # Multiple like arguments: | |
2021-07-11T02:17:19.0149323Z ( | |
2021-07-11T02:17:19.0185029Z (("foo__like", "2%2"), ("foo__like", "3%3")), | |
2021-07-11T02:17:19.0185548Z ['"foo" like :p0', '"foo" like :p1'], | |
2021-07-11T02:17:19.0185953Z ["2%2", "3%3"], | |
2021-07-11T02:17:19.0186248Z ), | |
2021-07-11T02:17:19.0186550Z # notlike: | |
2021-07-11T02:17:19.0193362Z ( | |
2021-07-11T02:17:19.0199333Z (("foo__notlike", "2%2"),), | |
2021-07-11T02:17:19.0199730Z ['"foo" not like :p0'], | |
2021-07-11T02:17:19.0200079Z ["2%2"], | |
2021-07-11T02:17:19.0200374Z ), | |
2021-07-11T02:17:19.0200737Z ( | |
2021-07-11T02:17:19.0201125Z (("foo__isnull", "1"), ("baz__isnull", "1"), ("bar__gt", "10")), | |
2021-07-11T02:17:19.0201598Z ['"bar" > :p0', '"baz" is null', '"foo" is null'], | |
2021-07-11T02:17:19.0201956Z [10], | |
2021-07-11T02:17:19.0202240Z ), | |
2021-07-11T02:17:19.0202601Z ((("foo__in", "1,2,3"),), ["foo in (:p0, :p1, :p2)"], ["1", "2", "3"]), | |
2021-07-11T02:17:19.0202980Z # date | |
2021-07-11T02:17:19.0203382Z ((("foo__date", "1988-01-01"),), ['date("foo") = :p0'], ["1988-01-01"]), | |
2021-07-11T02:17:19.0207940Z # JSON array variants of __in (useful for unexpected characters) | |
2021-07-11T02:17:19.0222796Z ((("foo__in", "[1,2,3]"),), ["foo in (:p0, :p1, :p2)"], [1, 2, 3]), | |
2021-07-11T02:17:19.0223310Z ( | |
2021-07-11T02:17:19.0223668Z (("foo__in", '["dog,cat", "cat[dog]"]'),), | |
2021-07-11T02:17:19.0224848Z ["foo in (:p0, :p1)"], | |
2021-07-11T02:17:19.0225248Z ["dog,cat", "cat[dog]"], | |
2021-07-11T02:17:19.0225569Z ), | |
2021-07-11T02:17:19.0225930Z # Not in, and JSON array not in | |
2021-07-11T02:17:19.0226393Z ((("foo__notin", "1,2,3"),), ["foo not in (:p0, :p1, :p2)"], ["1", "2", "3"]), | |
2021-07-11T02:17:19.0226866Z ((("foo__notin", "[1,2,3]"),), ["foo not in (:p0, :p1, :p2)"], [1, 2, 3]), | |
2021-07-11T02:17:19.0227321Z # JSON arraycontains | |
2021-07-11T02:17:19.0227673Z ( | |
2021-07-11T02:17:19.0228138Z (("Availability+Info__arraycontains", "yes"),), | |
2021-07-11T02:17:19.0228587Z [ | |
2021-07-11T02:17:19.0229254Z "rowid in (\n select table.rowid from table, json_each([table].[Availability+Info]) j\n where j.value = :p0\n )" | |
2021-07-11T02:17:19.0229889Z ], | |
2021-07-11T02:17:19.0230192Z ["yes"], | |
2021-07-11T02:17:19.0230475Z ), | |
2021-07-11T02:17:19.0230803Z ], | |
2021-07-11T02:17:19.0231074Z ) | |
2021-07-11T02:17:19.0231538Z def test_build_where(args, expected_where, expected_params): | |
2021-07-11T02:17:19.0232078Z f = Filters(sorted(args)) | |
2021-07-11T02:17:19.0232578Z sql_bits, actual_params = f.build_where_clauses("table") | |
2021-07-11T02:17:19.0233091Z > assert expected_where == sql_bits | |
2021-07-11T02:17:19.0233646Z E AssertionError: assert ['rowid in (\...0\n )'] == [] | |
2021-07-11T02:17:19.0234518Z E Left contains one more item: 'rowid in (\n select table.rowid from table, json_each([table].[Availability+Info]) j\n where j.value = :p0\n )' | |
2021-07-11T02:17:19.0235464Z E Use -v to get the full diff | |
2021-07-11T02:17:19.0235732Z | |
2021-07-11T02:17:19.0236250Z D:\a\datasette\datasette\tests\test_filters.py:72: AssertionError | |
2021-07-11T02:17:19.0236843Z _____________________________ test_static_mounts ______________________________ | |
2021-07-11T02:17:19.0237124Z | |
2021-07-11T02:17:19.0237458Z def test_static_mounts(): | |
2021-07-11T02:17:19.0237858Z with make_app_client( | |
2021-07-11T02:17:19.0238412Z static_mounts=[("custom-static", str(pathlib.Path(__file__).parent))] | |
2021-07-11T02:17:19.0238929Z ) as client: | |
2021-07-11T02:17:19.0239435Z response = client.get("/custom-static/test_html.py") | |
2021-07-11T02:17:19.0240002Z assert response.status == 200 | |
2021-07-11T02:17:19.0240591Z response = client.get("/custom-static/not_exists.py") | |
2021-07-11T02:17:19.0241192Z assert response.status == 404 | |
2021-07-11T02:17:19.0241759Z response = client.get("/custom-static/../LICENSE") | |
2021-07-11T02:17:19.0242320Z > assert response.status == 404 | |
2021-07-11T02:17:19.0242617Z | |
2021-07-11T02:17:19.0243018Z D:\a\datasette\datasette\tests\test_html.py:86: | |
2021-07-11T02:17:19.0243481Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0244060Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0244619Z next(self.gen) | |
2021-07-11T02:17:19.0245154Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0245709Z yield TestClient(ds) | |
2021-07-11T02:17:19.0246282Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0246852Z self.cleanup() | |
2021-07-11T02:17:19.0247418Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0248042Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0248647Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0249317Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0249961Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0250651Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0251106Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0251345Z | |
2021-07-11T02:17:19.0251807Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp7eij38ln' | |
2021-07-11T02:17:19.0252452Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B63F7D90> | |
2021-07-11T02:17:19.0252805Z | |
2021-07-11T02:17:19.0253174Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0253555Z try: | |
2021-07-11T02:17:19.0253915Z if os.path.islink(path): | |
2021-07-11T02:17:19.0254458Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0255076Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0255549Z except OSError: | |
2021-07-11T02:17:19.0256045Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0256670Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0257078Z return | |
2021-07-11T02:17:19.0257393Z names = [] | |
2021-07-11T02:17:19.0257678Z try: | |
2021-07-11T02:17:19.0258039Z names = os.listdir(path) | |
2021-07-11T02:17:19.0258445Z except OSError: | |
2021-07-11T02:17:19.0258897Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0259353Z for name in names: | |
2021-07-11T02:17:19.0259796Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0260183Z try: | |
2021-07-11T02:17:19.0260600Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0261030Z except OSError: | |
2021-07-11T02:17:19.0261438Z mode = 0 | |
2021-07-11T02:17:19.0261799Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0262246Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0262656Z else: | |
2021-07-11T02:17:19.0262964Z try: | |
2021-07-11T02:17:19.0263307Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0264259Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp7eij38ln\\fixtures.db' | |
2021-07-11T02:17:19.0265023Z | |
2021-07-11T02:17:19.0265580Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0266238Z __________________________ test_memory_database_page __________________________ | |
2021-07-11T02:17:19.0266537Z | |
2021-07-11T02:17:19.0266900Z def test_memory_database_page(): | |
2021-07-11T02:17:19.0267383Z with make_app_client(memory=True) as client: | |
2021-07-11T02:17:19.0267896Z response = client.get("/_memory") | |
2021-07-11T02:17:19.0268391Z > assert response.status == 200 | |
2021-07-11T02:17:19.0268687Z | |
2021-07-11T02:17:19.0269094Z D:\a\datasette\datasette\tests\test_html.py:92: | |
2021-07-11T02:17:19.0269561Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0270136Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0270877Z next(self.gen) | |
2021-07-11T02:17:19.0271435Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0271982Z yield TestClient(ds) | |
2021-07-11T02:17:19.0272567Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0273129Z self.cleanup() | |
2021-07-11T02:17:19.0273694Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0274318Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0274926Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0275531Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0276260Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0276931Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0277387Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0277622Z | |
2021-07-11T02:17:19.0278079Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmps15shlm_' | |
2021-07-11T02:17:19.0278702Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B3E5B2F0> | |
2021-07-11T02:17:19.0279081Z | |
2021-07-11T02:17:19.0279450Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0279838Z try: | |
2021-07-11T02:17:19.0280198Z if os.path.islink(path): | |
2021-07-11T02:17:19.0280770Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0281380Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0281854Z except OSError: | |
2021-07-11T02:17:19.0282356Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0282919Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0283343Z return | |
2021-07-11T02:17:19.0283653Z names = [] | |
2021-07-11T02:17:19.0283941Z try: | |
2021-07-11T02:17:19.0284301Z names = os.listdir(path) | |
2021-07-11T02:17:19.0284704Z except OSError: | |
2021-07-11T02:17:19.0285152Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0285602Z for name in names: | |
2021-07-11T02:17:19.0286045Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0286436Z try: | |
2021-07-11T02:17:19.0286829Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0287253Z except OSError: | |
2021-07-11T02:17:19.0287607Z mode = 0 | |
2021-07-11T02:17:19.0288034Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0288481Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0288894Z else: | |
2021-07-11T02:17:19.0289202Z try: | |
2021-07-11T02:17:19.0289546Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0290483Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmps15shlm_\\fixtures.db' | |
2021-07-11T02:17:19.0291275Z | |
2021-07-11T02:17:19.0291836Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0292488Z __________________________ test_not_allowed_methods ___________________________ | |
2021-07-11T02:17:19.0292785Z | |
2021-07-11T02:17:19.0293135Z def test_not_allowed_methods(): | |
2021-07-11T02:17:19.0293614Z with make_app_client(memory=True) as client: | |
2021-07-11T02:17:19.0294139Z for method in ("post", "put", "patch", "delete"): | |
2021-07-11T02:17:19.0294782Z response = client.request(path="/_memory", method=method.upper()) | |
2021-07-11T02:17:19.0295393Z > assert response.status == 405 | |
2021-07-11T02:17:19.0295697Z | |
2021-07-11T02:17:19.0296115Z D:\a\datasette\datasette\tests\test_html.py:99: | |
2021-07-11T02:17:19.0296573Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0297147Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0297713Z next(self.gen) | |
2021-07-11T02:17:19.0298234Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0298789Z yield TestClient(ds) | |
2021-07-11T02:17:19.0299370Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0299929Z self.cleanup() | |
2021-07-11T02:17:19.0300511Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0301161Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0301755Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0302416Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0303069Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0303726Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0304186Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0304426Z | |
2021-07-11T02:17:19.0304857Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp85y7_3qy' | |
2021-07-11T02:17:19.0305483Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B52C8840> | |
2021-07-11T02:17:19.0305848Z | |
2021-07-11T02:17:19.0306218Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0306590Z try: | |
2021-07-11T02:17:19.0306965Z if os.path.islink(path): | |
2021-07-11T02:17:19.0307496Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0308116Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0308602Z except OSError: | |
2021-07-11T02:17:19.0309094Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0309675Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0310105Z return | |
2021-07-11T02:17:19.0310406Z names = [] | |
2021-07-11T02:17:19.0310731Z try: | |
2021-07-11T02:17:19.0311094Z names = os.listdir(path) | |
2021-07-11T02:17:19.0311487Z except OSError: | |
2021-07-11T02:17:19.0311954Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0312414Z for name in names: | |
2021-07-11T02:17:19.0312848Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0313254Z try: | |
2021-07-11T02:17:19.0313637Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0314133Z except OSError: | |
2021-07-11T02:17:19.0314491Z mode = 0 | |
2021-07-11T02:17:19.0314841Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0315303Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0315717Z else: | |
2021-07-11T02:17:19.0316014Z try: | |
2021-07-11T02:17:19.0316373Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0317304Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp85y7_3qy\\fixtures.db' | |
2021-07-11T02:17:19.0318035Z | |
2021-07-11T02:17:19.0318594Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0319266Z _________________________ test_table_cell_truncation __________________________ | |
2021-07-11T02:17:19.0319570Z | |
2021-07-11T02:17:19.0319917Z def test_table_cell_truncation(): | |
2021-07-11T02:17:19.0320470Z with make_app_client(config={"truncate_cells_html": 5}) as client: | |
2021-07-11T02:17:19.0323072Z response = client.get("/fixtures/facetable") | |
2021-07-11T02:17:19.0323653Z assert response.status == 200 | |
2021-07-11T02:17:19.0324245Z table = Soup(response.body, "html.parser").find("table") | |
2021-07-11T02:17:19.0324877Z assert table["class"] == ["rows-and-columns"] | |
2021-07-11T02:17:19.0325305Z > assert [ | |
2021-07-11T02:17:19.0326419Z "Missi�", | |
2021-07-11T02:17:19.0326756Z "Dogpa�", | |
2021-07-11T02:17:19.0327076Z "SOMA", | |
2021-07-11T02:17:19.0327409Z "Tende�", | |
2021-07-11T02:17:19.0327724Z "Berna�", | |
2021-07-11T02:17:19.0328052Z "Hayes�", | |
2021-07-11T02:17:19.0328378Z "Holly�", | |
2021-07-11T02:17:19.0328689Z "Downt�", | |
2021-07-11T02:17:19.0329008Z "Los F�", | |
2021-07-11T02:17:19.0329314Z "Korea�", | |
2021-07-11T02:17:19.0329753Z "Downt�", | |
2021-07-11T02:17:19.0330078Z "Greek�", | |
2021-07-11T02:17:19.0330392Z "Corkt�", | |
2021-07-11T02:17:19.0330968Z "Mexic�", | |
2021-07-11T02:17:19.0331299Z "Arcad�", | |
2021-07-11T02:17:19.0331836Z ] == [td.string for td in table.findAll("td", {"class": "col-neighborhood"})] | |
2021-07-11T02:17:19.0332267Z | |
2021-07-11T02:17:19.0332700Z D:\a\datasette\datasette\tests\test_html.py:222: | |
2021-07-11T02:17:19.0333161Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0333754Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0334323Z next(self.gen) | |
2021-07-11T02:17:19.0334850Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0335415Z yield TestClient(ds) | |
2021-07-11T02:17:19.0336004Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0336570Z self.cleanup() | |
2021-07-11T02:17:19.0337152Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0337776Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0338363Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0338975Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0339614Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0340271Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0340809Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0341047Z | |
2021-07-11T02:17:19.0341492Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpzvdmoi_t' | |
2021-07-11T02:17:19.0342124Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B6384D90> | |
2021-07-11T02:17:19.0342485Z | |
2021-07-11T02:17:19.0342860Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0343333Z try: | |
2021-07-11T02:17:19.0343704Z if os.path.islink(path): | |
2021-07-11T02:17:19.0344231Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0344845Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0345333Z except OSError: | |
2021-07-11T02:17:19.0345816Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0346385Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0346813Z return | |
2021-07-11T02:17:19.0347113Z names = [] | |
2021-07-11T02:17:19.0347418Z try: | |
2021-07-11T02:17:19.0347781Z names = os.listdir(path) | |
2021-07-11T02:17:19.0348169Z except OSError: | |
2021-07-11T02:17:19.0348638Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0349089Z for name in names: | |
2021-07-11T02:17:19.0349532Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0349938Z try: | |
2021-07-11T02:17:19.0350316Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0350794Z except OSError: | |
2021-07-11T02:17:19.0351180Z mode = 0 | |
2021-07-11T02:17:19.0351536Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0351998Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0352409Z else: | |
2021-07-11T02:17:19.0352707Z try: | |
2021-07-11T02:17:19.0353062Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0354015Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpzvdmoi_t\\fixtures.db' | |
2021-07-11T02:17:19.0354772Z | |
2021-07-11T02:17:19.0355320Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0356002Z _______________________ test_row_page_does_not_truncate _______________________ | |
2021-07-11T02:17:19.0356318Z | |
2021-07-11T02:17:19.0356678Z def test_row_page_does_not_truncate(): | |
2021-07-11T02:17:19.0357297Z with make_app_client(config={"truncate_cells_html": 5}) as client: | |
2021-07-11T02:17:19.0357925Z response = client.get("/fixtures/facetable/1") | |
2021-07-11T02:17:19.0358460Z assert response.status == 200 | |
2021-07-11T02:17:19.0359046Z table = Soup(response.body, "html.parser").find("table") | |
2021-07-11T02:17:19.0359676Z assert table["class"] == ["rows-and-columns"] | |
2021-07-11T02:17:19.0360136Z > assert ["Mission"] == [ | |
2021-07-11T02:17:19.0360762Z td.string for td in table.findAll("td", {"class": "col-neighborhood"}) | |
2021-07-11T02:17:19.0361270Z ] | |
2021-07-11T02:17:19.0361452Z | |
2021-07-11T02:17:19.0361879Z D:\a\datasette\datasette\tests\test_html.py:247: | |
2021-07-11T02:17:19.0362353Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0362929Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0363500Z next(self.gen) | |
2021-07-11T02:17:19.0364038Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0364582Z yield TestClient(ds) | |
2021-07-11T02:17:19.0365170Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0365743Z self.cleanup() | |
2021-07-11T02:17:19.0366314Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0366935Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0367542Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0368133Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0368772Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0369418Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0369886Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0370192Z | |
2021-07-11T02:17:19.0370692Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp_auuw66i' | |
2021-07-11T02:17:19.0371310Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B3E6D400> | |
2021-07-11T02:17:19.0371681Z | |
2021-07-11T02:17:19.0372050Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0372420Z try: | |
2021-07-11T02:17:19.0372801Z if os.path.islink(path): | |
2021-07-11T02:17:19.0373343Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0373937Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0374429Z except OSError: | |
2021-07-11T02:17:19.0374927Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0375488Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0375914Z return | |
2021-07-11T02:17:19.0376227Z names = [] | |
2021-07-11T02:17:19.0376516Z try: | |
2021-07-11T02:17:19.0376882Z names = os.listdir(path) | |
2021-07-11T02:17:19.0377278Z except OSError: | |
2021-07-11T02:17:19.0377748Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0378200Z for name in names: | |
2021-07-11T02:17:19.0378636Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0379038Z try: | |
2021-07-11T02:17:19.0379438Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0379855Z except OSError: | |
2021-07-11T02:17:19.0380208Z mode = 0 | |
2021-07-11T02:17:19.0380623Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0381072Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0381485Z else: | |
2021-07-11T02:17:19.0381780Z try: | |
2021-07-11T02:17:19.0382138Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0383080Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp_auuw66i\\fixtures.db' | |
2021-07-11T02:17:19.0383838Z | |
2021-07-11T02:17:19.0384986Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0385707Z ____________________ test_database_download_for_immutable _____________________ | |
2021-07-11T02:17:19.0386046Z | |
2021-07-11T02:17:19.0386455Z def test_database_download_for_immutable(): | |
2021-07-11T02:17:19.0387009Z with make_app_client(is_immutable=True) as client: | |
2021-07-11T02:17:19.0387654Z assert not client.ds.databases["fixtures"].is_mutable | |
2021-07-11T02:17:19.0388254Z # Regular page should have a download link | |
2021-07-11T02:17:19.0388784Z response = client.get("/fixtures") | |
2021-07-11T02:17:19.0389352Z soup = Soup(response.body, "html.parser") | |
2021-07-11T02:17:19.0389945Z assert len(soup.findAll("a", {"href": re.compile(r"\.db$")})) | |
2021-07-11T02:17:19.0390510Z # Check we can actually download it | |
2021-07-11T02:17:19.0391120Z download_response = client.get("/fixtures.db") | |
2021-07-11T02:17:19.0391688Z assert 200 == download_response.status | |
2021-07-11T02:17:19.0392254Z # Check the content-length header exists | |
2021-07-11T02:17:19.0392909Z assert "content-length" in download_response.headers | |
2021-07-11T02:17:19.0393647Z content_length = download_response.headers["content-length"] | |
2021-07-11T02:17:19.0394291Z assert content_length.isdigit() | |
2021-07-11T02:17:19.0394774Z assert int(content_length) > 100 | |
2021-07-11T02:17:19.0395388Z assert "content-disposition" in download_response.headers | |
2021-07-11T02:17:19.0395945Z assert ( | |
2021-07-11T02:17:19.0396493Z download_response.headers["content-disposition"] | |
2021-07-11T02:17:19.0397141Z == 'attachment; filename="fixtures.db"' | |
2021-07-11T02:17:19.0397628Z ) | |
2021-07-11T02:17:19.0398190Z > assert download_response.headers["transfer-encoding"] == "chunked" | |
2021-07-11T02:17:19.0398646Z | |
2021-07-11T02:17:19.0399078Z D:\a\datasette\datasette\tests\test_html.py:1055: | |
2021-07-11T02:17:19.0399553Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0400118Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0400730Z next(self.gen) | |
2021-07-11T02:17:19.0401272Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0401819Z yield TestClient(ds) | |
2021-07-11T02:17:19.0402407Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0402972Z self.cleanup() | |
2021-07-11T02:17:19.0403539Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0404157Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0404762Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0405360Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0406003Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0406656Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0407123Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0407365Z | |
2021-07-11T02:17:19.0407834Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp7pgynf60' | |
2021-07-11T02:17:19.0408475Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B66AD7B8> | |
2021-07-11T02:17:19.0408852Z | |
2021-07-11T02:17:19.0409219Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0409597Z try: | |
2021-07-11T02:17:19.0409978Z if os.path.islink(path): | |
2021-07-11T02:17:19.0410579Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0411180Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0411668Z except OSError: | |
2021-07-11T02:17:19.0412221Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0412794Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0413222Z return | |
2021-07-11T02:17:19.0413538Z names = [] | |
2021-07-11T02:17:19.0413836Z try: | |
2021-07-11T02:17:19.0414202Z names = os.listdir(path) | |
2021-07-11T02:17:19.0414597Z except OSError: | |
2021-07-11T02:17:19.0415071Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0415520Z for name in names: | |
2021-07-11T02:17:19.0415951Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0416351Z try: | |
2021-07-11T02:17:19.0416747Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0417163Z except OSError: | |
2021-07-11T02:17:19.0417523Z mode = 0 | |
2021-07-11T02:17:19.0417887Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0418334Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0418743Z else: | |
2021-07-11T02:17:19.0419041Z try: | |
2021-07-11T02:17:19.0419398Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0420351Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp7pgynf60\\fixtures.db' | |
2021-07-11T02:17:19.0421180Z | |
2021-07-11T02:17:19.0421725Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0422462Z ________________ test_database_download_disallowed_for_memory _________________ | |
2021-07-11T02:17:19.0422825Z | |
2021-07-11T02:17:19.0423259Z def test_database_download_disallowed_for_memory(): | |
2021-07-11T02:17:19.0423810Z with make_app_client(memory=True) as client: | |
2021-07-11T02:17:19.0424353Z # Memory page should NOT have a download link | |
2021-07-11T02:17:19.0424922Z response = client.get("/_memory") | |
2021-07-11T02:17:19.0425474Z soup = Soup(response.body, "html.parser") | |
2021-07-11T02:17:19.0426083Z assert 0 == len(soup.findAll("a", {"href": re.compile(r"\.db$")})) | |
2021-07-11T02:17:19.0426648Z > assert 404 == client.get("/_memory.db").status | |
2021-07-11T02:17:19.0426973Z | |
2021-07-11T02:17:19.0427394Z D:\a\datasette\datasette\tests\test_html.py:1071: | |
2021-07-11T02:17:19.0427872Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0428437Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0429011Z next(self.gen) | |
2021-07-11T02:17:19.0429555Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0430098Z yield TestClient(ds) | |
2021-07-11T02:17:19.0431025Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0431625Z self.cleanup() | |
2021-07-11T02:17:19.0432204Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0432837Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0433429Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0434042Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0434676Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0435325Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0435790Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0436028Z | |
2021-07-11T02:17:19.0436488Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpfy9gkuw0' | |
2021-07-11T02:17:19.0437117Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B662D8C8> | |
2021-07-11T02:17:19.0437486Z | |
2021-07-11T02:17:19.0437862Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0438234Z try: | |
2021-07-11T02:17:19.0438615Z if os.path.islink(path): | |
2021-07-11T02:17:19.0439268Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0439872Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0440364Z except OSError: | |
2021-07-11T02:17:19.0440928Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0441494Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0441916Z return | |
2021-07-11T02:17:19.0442227Z names = [] | |
2021-07-11T02:17:19.0442518Z try: | |
2021-07-11T02:17:19.0442886Z names = os.listdir(path) | |
2021-07-11T02:17:19.0443279Z except OSError: | |
2021-07-11T02:17:19.0443748Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0444200Z for name in names: | |
2021-07-11T02:17:19.0444637Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0445047Z try: | |
2021-07-11T02:17:19.0445438Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0445859Z except OSError: | |
2021-07-11T02:17:19.0446217Z mode = 0 | |
2021-07-11T02:17:19.0446576Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0447032Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0447443Z else: | |
2021-07-11T02:17:19.0447737Z try: | |
2021-07-11T02:17:19.0448104Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0449059Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpfy9gkuw0\\fixtures.db' | |
2021-07-11T02:17:19.0449847Z | |
2021-07-11T02:17:19.0450399Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0451132Z ___________________________ test_allow_download_off ___________________________ | |
2021-07-11T02:17:19.0451503Z | |
2021-07-11T02:17:19.0451840Z def test_allow_download_off(): | |
2021-07-11T02:17:19.0452452Z with make_app_client(is_immutable=True, config={"allow_download": False}) as client: | |
2021-07-11T02:17:19.0453092Z response = client.get("/fixtures") | |
2021-07-11T02:17:19.0453635Z soup = Soup(response.body, "html.parser") | |
2021-07-11T02:17:19.0454258Z assert not len(soup.findAll("a", {"href": re.compile(r"\.db$")})) | |
2021-07-11T02:17:19.0454823Z # Accessing URL directly should 403 | |
2021-07-11T02:17:19.0455329Z response = client.get("/fixtures.db") | |
2021-07-11T02:17:19.0455840Z > assert 403 == response.status | |
2021-07-11T02:17:19.0456136Z | |
2021-07-11T02:17:19.0456557Z D:\a\datasette\datasette\tests\test_html.py:1081: | |
2021-07-11T02:17:19.0457026Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0457615Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0458172Z next(self.gen) | |
2021-07-11T02:17:19.0458706Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0459270Z yield TestClient(ds) | |
2021-07-11T02:17:19.0459855Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0460419Z self.cleanup() | |
2021-07-11T02:17:19.0461179Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0461794Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0462399Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0463014Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0463656Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0464327Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0464786Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0465038Z | |
2021-07-11T02:17:19.0465487Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpd7iq2ofh' | |
2021-07-11T02:17:19.0466223Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B65E1488> | |
2021-07-11T02:17:19.0466594Z | |
2021-07-11T02:17:19.0466951Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0467338Z try: | |
2021-07-11T02:17:19.0467719Z if os.path.islink(path): | |
2021-07-11T02:17:19.0468256Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0468873Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0469358Z except OSError: | |
2021-07-11T02:17:19.0469842Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0470414Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0470877Z return | |
2021-07-11T02:17:19.0471195Z names = [] | |
2021-07-11T02:17:19.0471498Z try: | |
2021-07-11T02:17:19.0471850Z names = os.listdir(path) | |
2021-07-11T02:17:19.0472255Z except OSError: | |
2021-07-11T02:17:19.0472723Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0473164Z for name in names: | |
2021-07-11T02:17:19.0473609Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0474016Z try: | |
2021-07-11T02:17:19.0474395Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0474829Z except OSError: | |
2021-07-11T02:17:19.0475174Z mode = 0 | |
2021-07-11T02:17:19.0475533Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0475997Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0476398Z else: | |
2021-07-11T02:17:19.0476707Z try: | |
2021-07-11T02:17:19.0477065Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0477992Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpd7iq2ofh\\fixtures.db' | |
2021-07-11T02:17:19.0478838Z | |
2021-07-11T02:17:19.0479397Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0480034Z _____________________________ test_allow_sql_off ______________________________ | |
2021-07-11T02:17:19.0480297Z | |
2021-07-11T02:17:19.0480672Z def test_allow_sql_off(): | |
2021-07-11T02:17:19.0481169Z with make_app_client(metadata={"allow_sql": {}}) as client: | |
2021-07-11T02:17:19.0481714Z response = client.get("/fixtures") | |
2021-07-11T02:17:19.0482276Z soup = Soup(response.body, "html.parser") | |
2021-07-11T02:17:19.0482882Z assert not len(soup.findAll("textarea", {"name": "sql"})) | |
2021-07-11T02:17:19.0483462Z # The table page should no longer show "View and edit SQL" | |
2021-07-11T02:17:19.0484051Z response = client.get("/fixtures/sortable") | |
2021-07-11T02:17:19.0484635Z > assert b"View and edit SQL" not in response.body | |
2021-07-11T02:17:19.0484967Z | |
2021-07-11T02:17:19.0485390Z D:\a\datasette\datasette\tests\test_html.py:1091: | |
2021-07-11T02:17:19.0485861Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0486424Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0486993Z next(self.gen) | |
2021-07-11T02:17:19.0487526Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0488067Z yield TestClient(ds) | |
2021-07-11T02:17:19.0488649Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0489209Z self.cleanup() | |
2021-07-11T02:17:19.0489776Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0490398Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0491040Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0491641Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0492281Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0493008Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0493465Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0493699Z | |
2021-07-11T02:17:19.0494165Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpe6pw6kbc' | |
2021-07-11T02:17:19.0494799Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B64656A8> | |
2021-07-11T02:17:19.0495167Z | |
2021-07-11T02:17:19.0495537Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0495910Z try: | |
2021-07-11T02:17:19.0496288Z if os.path.islink(path): | |
2021-07-11T02:17:19.0496829Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0497421Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0497905Z except OSError: | |
2021-07-11T02:17:19.0498406Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0498966Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0499388Z return | |
2021-07-11T02:17:19.0499706Z names = [] | |
2021-07-11T02:17:19.0499993Z try: | |
2021-07-11T02:17:19.0500354Z names = os.listdir(path) | |
2021-07-11T02:17:19.0500804Z except OSError: | |
2021-07-11T02:17:19.0501256Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0501703Z for name in names: | |
2021-07-11T02:17:19.0502138Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0502544Z try: | |
2021-07-11T02:17:19.0502933Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0503353Z except OSError: | |
2021-07-11T02:17:19.0503712Z mode = 0 | |
2021-07-11T02:17:19.0504078Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0504524Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0505011Z else: | |
2021-07-11T02:17:19.0505320Z try: | |
2021-07-11T02:17:19.0505665Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0506612Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpe6pw6kbc\\fixtures.db' | |
2021-07-11T02:17:19.0507385Z | |
2021-07-11T02:17:19.0507932Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0508604Z __________________________ test_custom_table_include __________________________ | |
2021-07-11T02:17:19.0508897Z | |
2021-07-11T02:17:19.0509253Z def test_custom_table_include(): | |
2021-07-11T02:17:19.0509667Z with make_app_client( | |
2021-07-11T02:17:19.0510227Z template_dir=str(pathlib.Path(__file__).parent / "test_templates") | |
2021-07-11T02:17:19.0510792Z ) as client: | |
2021-07-11T02:17:19.0511290Z response = client.get("/fixtures/complex_foreign_keys") | |
2021-07-11T02:17:19.0511863Z assert response.status == 200 | |
2021-07-11T02:17:19.0512261Z > assert ( | |
2021-07-11T02:17:19.0512701Z '<div class="custom-table-row">' | |
2021-07-11T02:17:19.0513413Z '1 - 2 - <a href="/fixtures/simple_primary_key/1">hello</a>�<em>1</em>' | |
2021-07-11T02:17:19.0513882Z "</div>" | |
2021-07-11T02:17:19.0514493Z ) == str(Soup(response.text, "html.parser").select_one("div.custom-table-row")) | |
2021-07-11T02:17:19.0514989Z | |
2021-07-11T02:17:19.0515411Z D:\a\datasette\datasette\tests\test_html.py:1396: | |
2021-07-11T02:17:19.0515868Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0516441Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0517005Z next(self.gen) | |
2021-07-11T02:17:19.0517540Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0518104Z yield TestClient(ds) | |
2021-07-11T02:17:19.0518682Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0519324Z self.cleanup() | |
2021-07-11T02:17:19.0519909Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0520572Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0521174Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0521787Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0522422Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0523090Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0523553Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0523793Z | |
2021-07-11T02:17:19.0524246Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpb8w7eyoi' | |
2021-07-11T02:17:19.0524904Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B52E7A60> | |
2021-07-11T02:17:19.0525275Z | |
2021-07-11T02:17:19.0525638Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0526034Z try: | |
2021-07-11T02:17:19.0526415Z if os.path.islink(path): | |
2021-07-11T02:17:19.0526953Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0527568Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0528060Z except OSError: | |
2021-07-11T02:17:19.0528539Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0529115Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0529527Z return | |
2021-07-11T02:17:19.0529843Z names = [] | |
2021-07-11T02:17:19.0530146Z try: | |
2021-07-11T02:17:19.0530495Z names = os.listdir(path) | |
2021-07-11T02:17:19.0530959Z except OSError: | |
2021-07-11T02:17:19.0531428Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0532692Z for name in names: | |
2021-07-11T02:17:19.0533143Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0533560Z try: | |
2021-07-11T02:17:19.0533941Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0534371Z except OSError: | |
2021-07-11T02:17:19.0534718Z mode = 0 | |
2021-07-11T02:17:19.0535091Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0535553Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0535951Z else: | |
2021-07-11T02:17:19.0536260Z try: | |
2021-07-11T02:17:19.0536622Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0537557Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpb8w7eyoi\\fixtures.db' | |
2021-07-11T02:17:19.0538333Z | |
2021-07-11T02:17:19.0538902Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0539579Z ________________________ test_config_template_debug_on ________________________ | |
2021-07-11T02:17:19.0539877Z | |
2021-07-11T02:17:19.0540250Z def test_config_template_debug_on(): | |
2021-07-11T02:17:19.0540884Z with make_app_client(config={"template_debug": True}) as client: | |
2021-07-11T02:17:19.0541518Z response = client.get("/fixtures/facetable?_context=1") | |
2021-07-11T02:17:19.0542087Z assert response.status == 200 | |
2021-07-11T02:17:19.0542674Z > assert response.text.startswith("<pre>{") | |
2021-07-11T02:17:19.0543071Z | |
2021-07-11T02:17:19.0543485Z D:\a\datasette\datasette\tests\test_html.py:1432: | |
2021-07-11T02:17:19.0543969Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0544532Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0545100Z next(self.gen) | |
2021-07-11T02:17:19.0545647Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0546192Z yield TestClient(ds) | |
2021-07-11T02:17:19.0546862Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0547435Z self.cleanup() | |
2021-07-11T02:17:19.0548004Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0548618Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0549217Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0549810Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0550442Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0557841Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0558302Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0558538Z | |
2021-07-11T02:17:19.0559000Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmponl5823w' | |
2021-07-11T02:17:19.0559646Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B63F1B70> | |
2021-07-11T02:17:19.0560018Z | |
2021-07-11T02:17:19.0560403Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0560865Z try: | |
2021-07-11T02:17:19.0561231Z if os.path.islink(path): | |
2021-07-11T02:17:19.0561776Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0562388Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0562869Z except OSError: | |
2021-07-11T02:17:19.0563361Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0563923Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0564350Z return | |
2021-07-11T02:17:19.0564662Z names = [] | |
2021-07-11T02:17:19.0564954Z try: | |
2021-07-11T02:17:19.0565313Z names = os.listdir(path) | |
2021-07-11T02:17:19.0565862Z except OSError: | |
2021-07-11T02:17:19.0566314Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0566766Z for name in names: | |
2021-07-11T02:17:19.0567215Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0567607Z try: | |
2021-07-11T02:17:19.0567998Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0568413Z except OSError: | |
2021-07-11T02:17:19.0568770Z mode = 0 | |
2021-07-11T02:17:19.0569135Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0569579Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0569991Z else: | |
2021-07-11T02:17:19.0570300Z try: | |
2021-07-11T02:17:19.0570697Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0571647Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmponl5823w\\fixtures.db' | |
2021-07-11T02:17:19.0572423Z | |
2021-07-11T02:17:19.0572966Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0573702Z _______________ test_debug_context_includes_extra_template_vars _______________ | |
2021-07-11T02:17:19.0574063Z | |
2021-07-11T02:17:19.0574502Z def test_debug_context_includes_extra_template_vars(): | |
2021-07-11T02:17:19.0575133Z # https://github.com/simonw/datasette/issues/693 | |
2021-07-11T02:17:19.0575785Z with make_app_client(config={"template_debug": True}) as client: | |
2021-07-11T02:17:19.0576434Z response = client.get("/fixtures/facetable?_context=1") | |
2021-07-11T02:17:19.0576978Z # scope_path is added by PLUGIN1 | |
2021-07-11T02:17:19.0577481Z > assert "scope_path" in response.text | |
2021-07-11T02:17:19.0577798Z | |
2021-07-11T02:17:19.0578202Z D:\a\datasette\datasette\tests\test_html.py:1446: | |
2021-07-11T02:17:19.0578670Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0579247Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0579803Z next(self.gen) | |
2021-07-11T02:17:19.0580410Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0581024Z yield TestClient(ds) | |
2021-07-11T02:17:19.0581594Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0582159Z self.cleanup() | |
2021-07-11T02:17:19.0582747Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0583354Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0584260Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0584868Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0585496Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0586164Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0586627Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0586850Z | |
2021-07-11T02:17:19.0587321Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpoocmghv4' | |
2021-07-11T02:17:19.0587967Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B78B0400> | |
2021-07-11T02:17:19.0588333Z | |
2021-07-11T02:17:19.0588694Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0589074Z try: | |
2021-07-11T02:17:19.0589436Z if os.path.islink(path): | |
2021-07-11T02:17:19.0589975Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0590794Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0591292Z except OSError: | |
2021-07-11T02:17:19.0591789Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0592360Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0592773Z return | |
2021-07-11T02:17:19.0593198Z names = [] | |
2021-07-11T02:17:19.0593501Z try: | |
2021-07-11T02:17:19.0593849Z names = os.listdir(path) | |
2021-07-11T02:17:19.0594254Z except OSError: | |
2021-07-11T02:17:19.0594725Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0595160Z for name in names: | |
2021-07-11T02:17:19.0595608Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0595995Z try: | |
2021-07-11T02:17:19.0596385Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0596815Z except OSError: | |
2021-07-11T02:17:19.0597156Z mode = 0 | |
2021-07-11T02:17:19.0597518Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0597973Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0598371Z else: | |
2021-07-11T02:17:19.0598683Z try: | |
2021-07-11T02:17:19.0599045Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0599983Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpoocmghv4\\fixtures.db' | |
2021-07-11T02:17:19.0600813Z | |
2021-07-11T02:17:19.0601372Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0602087Z _________ test_edit_sql_link_not_shown_if_user_lacks_permission[True] _________ | |
2021-07-11T02:17:19.0602449Z | |
2021-07-11T02:17:19.0602791Z permission_allowed = True | |
2021-07-11T02:17:19.0603062Z | |
2021-07-11T02:17:19.0603588Z @pytest.mark.parametrize("permission_allowed", [True, False]) | |
2021-07-11T02:17:19.0604364Z def test_edit_sql_link_not_shown_if_user_lacks_permission(permission_allowed): | |
2021-07-11T02:17:19.0604931Z with make_app_client( | |
2021-07-11T02:17:19.0605293Z metadata={ | |
2021-07-11T02:17:19.0605794Z "allow_sql": None if permission_allowed else {"id": "not-you"}, | |
2021-07-11T02:17:19.0606421Z "databases": {"fixtures": {"queries": {"simple": "select 1 + 1"}}}, | |
2021-07-11T02:17:19.0606854Z } | |
2021-07-11T02:17:19.0607161Z ) as client: | |
2021-07-11T02:17:19.0607685Z response = client.get("/fixtures/simple") | |
2021-07-11T02:17:19.0608179Z if permission_allowed: | |
2021-07-11T02:17:19.0608666Z assert "Edit SQL" in response.text | |
2021-07-11T02:17:19.0609083Z else: | |
2021-07-11T02:17:19.0609493Z > assert "Edit SQL" not in response.text | |
2021-07-11T02:17:19.0609810Z | |
2021-07-11T02:17:19.0610233Z D:\a\datasette\datasette\tests\test_html.py:1600: | |
2021-07-11T02:17:19.0610736Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0611309Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0611871Z next(self.gen) | |
2021-07-11T02:17:19.0612395Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0612954Z yield TestClient(ds) | |
2021-07-11T02:17:19.0613536Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0614089Z self.cleanup() | |
2021-07-11T02:17:19.0614671Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0615295Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0615882Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0616489Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0617112Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0617779Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0618238Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0618473Z | |
2021-07-11T02:17:19.0618924Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpq6cswcy6' | |
2021-07-11T02:17:19.0619567Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B7A48158> | |
2021-07-11T02:17:19.0619983Z | |
2021-07-11T02:17:19.0620340Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0620775Z try: | |
2021-07-11T02:17:19.0621153Z if os.path.islink(path): | |
2021-07-11T02:17:19.0621688Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0622301Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0622788Z except OSError: | |
2021-07-11T02:17:19.0623271Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0623842Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0624265Z return | |
2021-07-11T02:17:19.0624567Z names = [] | |
2021-07-11T02:17:19.0624866Z try: | |
2021-07-11T02:17:19.0625217Z names = os.listdir(path) | |
2021-07-11T02:17:19.0625620Z except OSError: | |
2021-07-11T02:17:19.0626084Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0626523Z for name in names: | |
2021-07-11T02:17:19.0626965Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0627372Z try: | |
2021-07-11T02:17:19.0627750Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0628182Z except OSError: | |
2021-07-11T02:17:19.0628542Z mode = 0 | |
2021-07-11T02:17:19.0628892Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0629355Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0629751Z else: | |
2021-07-11T02:17:19.0630057Z try: | |
2021-07-11T02:17:19.0630415Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0631407Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpq6cswcy6\\fixtures.db' | |
2021-07-11T02:17:19.0632174Z | |
2021-07-11T02:17:19.0632728Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0633464Z ________ test_edit_sql_link_not_shown_if_user_lacks_permission[False] _________ | |
2021-07-11T02:17:19.0633835Z | |
2021-07-11T02:17:19.0634221Z permission_allowed = False | |
2021-07-11T02:17:19.0634499Z | |
2021-07-11T02:17:19.0635038Z @pytest.mark.parametrize("permission_allowed", [True, False]) | |
2021-07-11T02:17:19.0635799Z def test_edit_sql_link_not_shown_if_user_lacks_permission(permission_allowed): | |
2021-07-11T02:17:19.0636364Z with make_app_client( | |
2021-07-11T02:17:19.0636835Z metadata={ | |
2021-07-11T02:17:19.0637483Z "allow_sql": None if permission_allowed else {"id": "not-you"}, | |
2021-07-11T02:17:19.0638153Z "databases": {"fixtures": {"queries": {"simple": "select 1 + 1"}}}, | |
2021-07-11T02:17:19.0638691Z } | |
2021-07-11T02:17:19.0639077Z ) as client: | |
2021-07-11T02:17:19.0639573Z response = client.get("/fixtures/simple") | |
2021-07-11T02:17:19.0640191Z if permission_allowed: | |
2021-07-11T02:17:19.0640820Z assert "Edit SQL" in response.text | |
2021-07-11T02:17:19.0641252Z else: | |
2021-07-11T02:17:19.0641745Z > assert "Edit SQL" not in response.text | |
2021-07-11T02:17:19.0642095Z | |
2021-07-11T02:17:19.0642528Z D:\a\datasette\datasette\tests\test_html.py:1600: | |
2021-07-11T02:17:19.0643118Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0643746Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0644333Z next(self.gen) | |
2021-07-11T02:17:19.0644922Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0645543Z yield TestClient(ds) | |
2021-07-11T02:17:19.0646152Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0646783Z self.cleanup() | |
2021-07-11T02:17:19.0647421Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0648139Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0648813Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0649506Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0650165Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0652157Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0652642Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0652912Z | |
2021-07-11T02:17:19.0653459Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpccizy_m3' | |
2021-07-11T02:17:19.0654185Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B52EDF28> | |
2021-07-11T02:17:19.0654596Z | |
2021-07-11T02:17:19.0655004Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0655469Z try: | |
2021-07-11T02:17:19.0655899Z if os.path.islink(path): | |
2021-07-11T02:17:19.0656530Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0657222Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0657724Z except OSError: | |
2021-07-11T02:17:19.0658272Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0658917Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0659354Z return | |
2021-07-11T02:17:19.0659731Z names = [] | |
2021-07-11T02:17:19.0660090Z try: | |
2021-07-11T02:17:19.0660465Z names = os.listdir(path) | |
2021-07-11T02:17:19.0661005Z except OSError: | |
2021-07-11T02:17:19.0661492Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0662008Z for name in names: | |
2021-07-11T02:17:19.0662511Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0662932Z try: | |
2021-07-11T02:17:19.0663394Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0663880Z except OSError: | |
2021-07-11T02:17:19.0664254Z mode = 0 | |
2021-07-11T02:17:19.0664658Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0689369Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0689820Z else: | |
2021-07-11T02:17:19.0690126Z try: | |
2021-07-11T02:17:19.0690491Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0691540Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpccizy_m3\\fixtures.db' | |
2021-07-11T02:17:19.0692295Z | |
2021-07-11T02:17:19.0692836Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0693877Z _ test_facet_more_links[5-/fixtures/facetable?_facet=neighborhood-2-True-/fixtures/facetable?_facet=neighborhood&_facet_size=max] _ | |
2021-07-11T02:17:19.0694522Z | |
2021-07-11T02:17:19.0695002Z max_returned_rows = 5, path = '/fixtures/facetable?_facet=neighborhood' | |
2021-07-11T02:17:19.0695659Z expected_num_facets = 2, expected_ellipses = True | |
2021-07-11T02:17:19.0696364Z expected_ellipses_url = '/fixtures/facetable?_facet=neighborhood&_facet_size=max' | |
2021-07-11T02:17:19.0696823Z | |
2021-07-11T02:17:19.0697229Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.0698040Z "max_returned_rows,path,expected_num_facets,expected_ellipses,expected_ellipses_url", | |
2021-07-11T02:17:19.0698694Z ( | |
2021-07-11T02:17:19.0698959Z ( | |
2021-07-11T02:17:19.0699242Z 5, | |
2021-07-11T02:17:19.0699607Z # Default should show 2 facets | |
2021-07-11T02:17:19.0700146Z "/fixtures/facetable?_facet=neighborhood", | |
2021-07-11T02:17:19.0701223Z 2, | |
2021-07-11T02:17:19.0701534Z True, | |
2021-07-11T02:17:19.0702035Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0702512Z ), | |
2021-07-11T02:17:19.0703085Z # _facet_size above max_returned_rows should show max_returned_rows (5) | |
2021-07-11T02:17:19.0703560Z ( | |
2021-07-11T02:17:19.0703843Z 5, | |
2021-07-11T02:17:19.0704314Z "/fixtures/facetable?_facet=neighborhood&_facet_size=50", | |
2021-07-11T02:17:19.0704792Z 5, | |
2021-07-11T02:17:19.0705095Z True, | |
2021-07-11T02:17:19.0705580Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0706054Z ), | |
2021-07-11T02:17:19.0706493Z # If max_returned_rows is high enough, should return all | |
2021-07-11T02:17:19.0706936Z ( | |
2021-07-11T02:17:19.0707221Z 20, | |
2021-07-11T02:17:19.0707692Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0708168Z 14, | |
2021-07-11T02:17:19.0708477Z False, | |
2021-07-11T02:17:19.0708783Z None, | |
2021-07-11T02:17:19.0709078Z ), | |
2021-07-11T02:17:19.0709521Z # If num facets > max_returned_rows, show ... without a link | |
2021-07-11T02:17:19.0710149Z # _facet_size above max_returned_rows should show max_returned_rows (5) | |
2021-07-11T02:17:19.0710675Z ( | |
2021-07-11T02:17:19.0710946Z 5, | |
2021-07-11T02:17:19.0711432Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0711903Z 5, | |
2021-07-11T02:17:19.0712191Z True, | |
2021-07-11T02:17:19.0712510Z None, | |
2021-07-11T02:17:19.0712805Z ), | |
2021-07-11T02:17:19.0713067Z ), | |
2021-07-11T02:17:19.0713335Z ) | |
2021-07-11T02:17:19.0713673Z def test_facet_more_links( | |
2021-07-11T02:17:19.0714056Z max_returned_rows, | |
2021-07-11T02:17:19.0714401Z path, | |
2021-07-11T02:17:19.0714748Z expected_num_facets, | |
2021-07-11T02:17:19.0715167Z expected_ellipses, | |
2021-07-11T02:17:19.0715598Z expected_ellipses_url, | |
2021-07-11T02:17:19.0715942Z ): | |
2021-07-11T02:17:19.0716271Z with make_app_client( | |
2021-07-11T02:17:19.0716872Z config={"max_returned_rows": max_returned_rows, "default_facet_size": 2} | |
2021-07-11T02:17:19.0717367Z ) as client: | |
2021-07-11T02:17:19.0717777Z response = client.get(path) | |
2021-07-11T02:17:19.0718304Z soup = Soup(response.body, "html.parser") | |
2021-07-11T02:17:19.0719013Z lis = soup.select("#facet-neighborhood ul li:not(.facet-truncated)") | |
2021-07-11T02:17:19.0719763Z facet_truncated = soup.select_one(".facet-truncated") | |
2021-07-11T02:17:19.0720342Z assert len(lis) == expected_num_facets | |
2021-07-11T02:17:19.0720875Z if not expected_ellipses: | |
2021-07-11T02:17:19.0721350Z assert facet_truncated is None | |
2021-07-11T02:17:19.0721732Z else: | |
2021-07-11T02:17:19.0722125Z if expected_ellipses_url: | |
2021-07-11T02:17:19.0722722Z assert facet_truncated.find("a")["href"] == expected_ellipses_url | |
2021-07-11T02:17:19.0723229Z else: | |
2021-07-11T02:17:19.0723669Z > assert facet_truncated.find("a") is None | |
2021-07-11T02:17:19.0724001Z | |
2021-07-11T02:17:19.0724409Z D:\a\datasette\datasette\tests\test_html.py:1700: | |
2021-07-11T02:17:19.0724882Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0725461Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0726019Z next(self.gen) | |
2021-07-11T02:17:19.0726559Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0727114Z yield TestClient(ds) | |
2021-07-11T02:17:19.0727685Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0728246Z self.cleanup() | |
2021-07-11T02:17:19.0728831Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0729504Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0730107Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0730783Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0731411Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0732073Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0732534Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0732755Z | |
2021-07-11T02:17:19.0733220Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpvq1rx76j' | |
2021-07-11T02:17:19.0733858Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B52E7158> | |
2021-07-11T02:17:19.0734226Z | |
2021-07-11T02:17:19.0734582Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0734965Z try: | |
2021-07-11T02:17:19.0735340Z if os.path.islink(path): | |
2021-07-11T02:17:19.0735868Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0736474Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0736952Z except OSError: | |
2021-07-11T02:17:19.0737436Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0738011Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0738436Z return | |
2021-07-11T02:17:19.0738736Z names = [] | |
2021-07-11T02:17:19.0739036Z try: | |
2021-07-11T02:17:19.0739383Z names = os.listdir(path) | |
2021-07-11T02:17:19.0739788Z except OSError: | |
2021-07-11T02:17:19.0740259Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0740742Z for name in names: | |
2021-07-11T02:17:19.0741185Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0741586Z try: | |
2021-07-11T02:17:19.0741961Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0742392Z except OSError: | |
2021-07-11T02:17:19.0742736Z mode = 0 | |
2021-07-11T02:17:19.0743098Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0743558Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0744008Z else: | |
2021-07-11T02:17:19.0744322Z try: | |
2021-07-11T02:17:19.0744688Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0745621Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpvq1rx76j\\fixtures.db' | |
2021-07-11T02:17:19.0746389Z | |
2021-07-11T02:17:19.0746949Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0747983Z _ test_facet_more_links[5-/fixtures/facetable?_facet=neighborhood&_facet_size=50-5-True-/fixtures/facetable?_facet=neighborhood&_facet_size=max] _ | |
2021-07-11T02:17:19.0748616Z | |
2021-07-11T02:17:19.0748931Z max_returned_rows = 5 | |
2021-07-11T02:17:19.0749460Z path = '/fixtures/facetable?_facet=neighborhood&_facet_size=50' | |
2021-07-11T02:17:19.0750067Z expected_num_facets = 5, expected_ellipses = True | |
2021-07-11T02:17:19.0751221Z expected_ellipses_url = '/fixtures/facetable?_facet=neighborhood&_facet_size=max' | |
2021-07-11T02:17:19.0751692Z | |
2021-07-11T02:17:19.0752116Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.0752955Z "max_returned_rows,path,expected_num_facets,expected_ellipses,expected_ellipses_url", | |
2021-07-11T02:17:19.0753605Z ( | |
2021-07-11T02:17:19.0753868Z ( | |
2021-07-11T02:17:19.0754157Z 5, | |
2021-07-11T02:17:19.0754536Z # Default should show 2 facets | |
2021-07-11T02:17:19.0755049Z "/fixtures/facetable?_facet=neighborhood", | |
2021-07-11T02:17:19.0755483Z 2, | |
2021-07-11T02:17:19.0755789Z True, | |
2021-07-11T02:17:19.0756275Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0756754Z ), | |
2021-07-11T02:17:19.0757318Z # _facet_size above max_returned_rows should show max_returned_rows (5) | |
2021-07-11T02:17:19.0757765Z ( | |
2021-07-11T02:17:19.0758040Z 5, | |
2021-07-11T02:17:19.0758509Z "/fixtures/facetable?_facet=neighborhood&_facet_size=50", | |
2021-07-11T02:17:19.0758956Z 5, | |
2021-07-11T02:17:19.0759243Z True, | |
2021-07-11T02:17:19.0759722Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0760188Z ), | |
2021-07-11T02:17:19.0760681Z # If max_returned_rows is high enough, should return all | |
2021-07-11T02:17:19.0761103Z ( | |
2021-07-11T02:17:19.0761384Z 20, | |
2021-07-11T02:17:19.0761869Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0762330Z 14, | |
2021-07-11T02:17:19.0762635Z False, | |
2021-07-11T02:17:19.0762959Z None, | |
2021-07-11T02:17:19.0763246Z ), | |
2021-07-11T02:17:19.0763687Z # If num facets > max_returned_rows, show ... without a link | |
2021-07-11T02:17:19.0764310Z # _facet_size above max_returned_rows should show max_returned_rows (5) | |
2021-07-11T02:17:19.0764779Z ( | |
2021-07-11T02:17:19.0765060Z 5, | |
2021-07-11T02:17:19.0765533Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0766002Z 5, | |
2021-07-11T02:17:19.0766303Z True, | |
2021-07-11T02:17:19.0766603Z None, | |
2021-07-11T02:17:19.0766894Z ), | |
2021-07-11T02:17:19.0767169Z ), | |
2021-07-11T02:17:19.0767423Z ) | |
2021-07-11T02:17:19.0767759Z def test_facet_more_links( | |
2021-07-11T02:17:19.0768142Z max_returned_rows, | |
2021-07-11T02:17:19.0768483Z path, | |
2021-07-11T02:17:19.0768840Z expected_num_facets, | |
2021-07-11T02:17:19.0769244Z expected_ellipses, | |
2021-07-11T02:17:19.0769678Z expected_ellipses_url, | |
2021-07-11T02:17:19.0770028Z ): | |
2021-07-11T02:17:19.0770345Z with make_app_client( | |
2021-07-11T02:17:19.0770987Z config={"max_returned_rows": max_returned_rows, "default_facet_size": 2} | |
2021-07-11T02:17:19.0771478Z ) as client: | |
2021-07-11T02:17:19.0771883Z response = client.get(path) | |
2021-07-11T02:17:19.0772420Z soup = Soup(response.body, "html.parser") | |
2021-07-11T02:17:19.0773116Z lis = soup.select("#facet-neighborhood ul li:not(.facet-truncated)") | |
2021-07-11T02:17:19.0773857Z facet_truncated = soup.select_one(".facet-truncated") | |
2021-07-11T02:17:19.0774447Z assert len(lis) == expected_num_facets | |
2021-07-11T02:17:19.0774913Z if not expected_ellipses: | |
2021-07-11T02:17:19.0775384Z assert facet_truncated is None | |
2021-07-11T02:17:19.0775773Z else: | |
2021-07-11T02:17:19.0776158Z if expected_ellipses_url: | |
2021-07-11T02:17:19.0776760Z assert facet_truncated.find("a")["href"] == expected_ellipses_url | |
2021-07-11T02:17:19.0777275Z else: | |
2021-07-11T02:17:19.0777698Z > assert facet_truncated.find("a") is None | |
2021-07-11T02:17:19.0778030Z | |
2021-07-11T02:17:19.0778449Z D:\a\datasette\datasette\tests\test_html.py:1700: | |
2021-07-11T02:17:19.0778910Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0779489Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0780052Z next(self.gen) | |
2021-07-11T02:17:19.0781113Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0781705Z yield TestClient(ds) | |
2021-07-11T02:17:19.0782292Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0782853Z self.cleanup() | |
2021-07-11T02:17:19.0783438Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0784145Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0784731Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0785349Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0785990Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0786651Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0787109Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0787349Z | |
2021-07-11T02:17:19.0787800Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpg7uyzisk' | |
2021-07-11T02:17:19.0788450Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B77E0BF8> | |
2021-07-11T02:17:19.0788820Z | |
2021-07-11T02:17:19.0789191Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0789562Z try: | |
2021-07-11T02:17:19.0789935Z if os.path.islink(path): | |
2021-07-11T02:17:19.0790465Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0791129Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0791618Z except OSError: | |
2021-07-11T02:17:19.0792100Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0792672Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0793103Z return | |
2021-07-11T02:17:19.0793403Z names = [] | |
2021-07-11T02:17:19.0793702Z try: | |
2021-07-11T02:17:19.0794068Z names = os.listdir(path) | |
2021-07-11T02:17:19.0794461Z except OSError: | |
2021-07-11T02:17:19.0794935Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0795373Z for name in names: | |
2021-07-11T02:17:19.0795817Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0796220Z try: | |
2021-07-11T02:17:19.0796601Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0797037Z except OSError: | |
2021-07-11T02:17:19.0797394Z mode = 0 | |
2021-07-11T02:17:19.0797741Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0798260Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0798678Z else: | |
2021-07-11T02:17:19.0798974Z try: | |
2021-07-11T02:17:19.0799331Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0800285Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpg7uyzisk\\fixtures.db' | |
2021-07-11T02:17:19.0801090Z | |
2021-07-11T02:17:19.0801648Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0802545Z _ test_facet_more_links[20-/fixtures/facetable?_facet=neighborhood&_facet_size=max-14-False-None] _ | |
2021-07-11T02:17:19.0803056Z | |
2021-07-11T02:17:19.0803358Z max_returned_rows = 20 | |
2021-07-11T02:17:19.0803887Z path = '/fixtures/facetable?_facet=neighborhood&_facet_size=max' | |
2021-07-11T02:17:19.0804528Z expected_num_facets = 14, expected_ellipses = False | |
2021-07-11T02:17:19.0805037Z expected_ellipses_url = None | |
2021-07-11T02:17:19.0805320Z | |
2021-07-11T02:17:19.0805742Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.0806553Z "max_returned_rows,path,expected_num_facets,expected_ellipses,expected_ellipses_url", | |
2021-07-11T02:17:19.0807215Z ( | |
2021-07-11T02:17:19.0807496Z ( | |
2021-07-11T02:17:19.0807767Z 5, | |
2021-07-11T02:17:19.0808145Z # Default should show 2 facets | |
2021-07-11T02:17:19.0808679Z "/fixtures/facetable?_facet=neighborhood", | |
2021-07-11T02:17:19.0809104Z 2, | |
2021-07-11T02:17:19.0809410Z True, | |
2021-07-11T02:17:19.0809899Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0810371Z ), | |
2021-07-11T02:17:19.0811169Z # _facet_size above max_returned_rows should show max_returned_rows (5) | |
2021-07-11T02:17:19.0811715Z ( | |
2021-07-11T02:17:19.0812004Z 5, | |
2021-07-11T02:17:19.0812493Z "/fixtures/facetable?_facet=neighborhood&_facet_size=50", | |
2021-07-11T02:17:19.0812947Z 5, | |
2021-07-11T02:17:19.0813251Z True, | |
2021-07-11T02:17:19.0813755Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0814208Z ), | |
2021-07-11T02:17:19.0814644Z # If max_returned_rows is high enough, should return all | |
2021-07-11T02:17:19.0815066Z ( | |
2021-07-11T02:17:19.0815346Z 20, | |
2021-07-11T02:17:19.0815835Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0816297Z 14, | |
2021-07-11T02:17:19.0816608Z False, | |
2021-07-11T02:17:19.0816927Z None, | |
2021-07-11T02:17:19.0817210Z ), | |
2021-07-11T02:17:19.0817650Z # If num facets > max_returned_rows, show ... without a link | |
2021-07-11T02:17:19.0818284Z # _facet_size above max_returned_rows should show max_returned_rows (5) | |
2021-07-11T02:17:19.0818742Z ( | |
2021-07-11T02:17:19.0819028Z 5, | |
2021-07-11T02:17:19.0819516Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0819978Z 5, | |
2021-07-11T02:17:19.0820279Z True, | |
2021-07-11T02:17:19.0820630Z None, | |
2021-07-11T02:17:19.0820932Z ), | |
2021-07-11T02:17:19.0821199Z ), | |
2021-07-11T02:17:19.0821466Z ) | |
2021-07-11T02:17:19.0821787Z def test_facet_more_links( | |
2021-07-11T02:17:19.0822183Z max_returned_rows, | |
2021-07-11T02:17:19.0822524Z path, | |
2021-07-11T02:17:19.0822869Z expected_num_facets, | |
2021-07-11T02:17:19.0823288Z expected_ellipses, | |
2021-07-11T02:17:19.0823703Z expected_ellipses_url, | |
2021-07-11T02:17:19.0824059Z ): | |
2021-07-11T02:17:19.0824385Z with make_app_client( | |
2021-07-11T02:17:19.0824914Z config={"max_returned_rows": max_returned_rows, "default_facet_size": 2} | |
2021-07-11T02:17:19.0825471Z ) as client: | |
2021-07-11T02:17:19.0825880Z response = client.get(path) | |
2021-07-11T02:17:19.0826405Z soup = Soup(response.body, "html.parser") | |
2021-07-11T02:17:19.0827116Z lis = soup.select("#facet-neighborhood ul li:not(.facet-truncated)") | |
2021-07-11T02:17:19.0827865Z facet_truncated = soup.select_one(".facet-truncated") | |
2021-07-11T02:17:19.0828445Z assert len(lis) == expected_num_facets | |
2021-07-11T02:17:19.0828928Z if not expected_ellipses: | |
2021-07-11T02:17:19.0829400Z assert facet_truncated is None | |
2021-07-11T02:17:19.0829778Z else: | |
2021-07-11T02:17:19.0830172Z if expected_ellipses_url: | |
2021-07-11T02:17:19.0830824Z assert facet_truncated.find("a")["href"] == expected_ellipses_url | |
2021-07-11T02:17:19.0831330Z else: | |
2021-07-11T02:17:19.0831765Z > assert facet_truncated.find("a") is None | |
2021-07-11T02:17:19.0832101Z | |
2021-07-11T02:17:19.0832506Z D:\a\datasette\datasette\tests\test_html.py:1700: | |
2021-07-11T02:17:19.0832978Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0833553Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0834101Z next(self.gen) | |
2021-07-11T02:17:19.0834636Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0835189Z yield TestClient(ds) | |
2021-07-11T02:17:19.0835760Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0836322Z self.cleanup() | |
2021-07-11T02:17:19.0836901Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0837503Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0838166Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0838761Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0839406Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0840069Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0840513Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0840800Z | |
2021-07-11T02:17:19.0841261Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpx7eyt4va' | |
2021-07-11T02:17:19.0841916Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B7A0FB70> | |
2021-07-11T02:17:19.0842275Z | |
2021-07-11T02:17:19.0842644Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0843023Z try: | |
2021-07-11T02:17:19.0843384Z if os.path.islink(path): | |
2021-07-11T02:17:19.0843923Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0844531Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0845000Z except OSError: | |
2021-07-11T02:17:19.0845500Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0846078Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0846489Z return | |
2021-07-11T02:17:19.0846801Z names = [] | |
2021-07-11T02:17:19.0847090Z try: | |
2021-07-11T02:17:19.0847447Z names = os.listdir(path) | |
2021-07-11T02:17:19.0847856Z except OSError: | |
2021-07-11T02:17:19.0848304Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0848750Z for name in names: | |
2021-07-11T02:17:19.0849191Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0849577Z try: | |
2021-07-11T02:17:19.0849965Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0850400Z except OSError: | |
2021-07-11T02:17:19.0850791Z mode = 0 | |
2021-07-11T02:17:19.0851155Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0851599Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0852703Z else: | |
2021-07-11T02:17:19.0853030Z try: | |
2021-07-11T02:17:19.0853374Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0854330Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpx7eyt4va\\fixtures.db' | |
2021-07-11T02:17:19.0855093Z | |
2021-07-11T02:17:19.0855646Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0856515Z _ test_facet_more_links[5-/fixtures/facetable?_facet=neighborhood&_facet_size=max-5-True-None] _ | |
2021-07-11T02:17:19.0857021Z | |
2021-07-11T02:17:19.0857330Z max_returned_rows = 5 | |
2021-07-11T02:17:19.0857843Z path = '/fixtures/facetable?_facet=neighborhood&_facet_size=max' | |
2021-07-11T02:17:19.0858584Z expected_num_facets = 5, expected_ellipses = True, expected_ellipses_url = None | |
2021-07-11T02:17:19.0859027Z | |
2021-07-11T02:17:19.0859443Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.0860246Z "max_returned_rows,path,expected_num_facets,expected_ellipses,expected_ellipses_url", | |
2021-07-11T02:17:19.0860965Z ( | |
2021-07-11T02:17:19.0861240Z ( | |
2021-07-11T02:17:19.0861509Z 5, | |
2021-07-11T02:17:19.0861884Z # Default should show 2 facets | |
2021-07-11T02:17:19.0863705Z "/fixtures/facetable?_facet=neighborhood", | |
2021-07-11T02:17:19.0864128Z 2, | |
2021-07-11T02:17:19.0864429Z True, | |
2021-07-11T02:17:19.0864915Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0865390Z ), | |
2021-07-11T02:17:19.0865871Z # _facet_size above max_returned_rows should show max_returned_rows (5) | |
2021-07-11T02:17:19.0866326Z ( | |
2021-07-11T02:17:19.0866707Z 5, | |
2021-07-11T02:17:19.0867188Z "/fixtures/facetable?_facet=neighborhood&_facet_size=50", | |
2021-07-11T02:17:19.0867640Z 5, | |
2021-07-11T02:17:19.0867943Z True, | |
2021-07-11T02:17:19.0868441Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0868901Z ), | |
2021-07-11T02:17:19.0869353Z # If max_returned_rows is high enough, should return all | |
2021-07-11T02:17:19.0869775Z ( | |
2021-07-11T02:17:19.0870062Z 20, | |
2021-07-11T02:17:19.0870605Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0871068Z 14, | |
2021-07-11T02:17:19.0871375Z False, | |
2021-07-11T02:17:19.0871696Z None, | |
2021-07-11T02:17:19.0871981Z ), | |
2021-07-11T02:17:19.0872420Z # If num facets > max_returned_rows, show ... without a link | |
2021-07-11T02:17:19.0873057Z # _facet_size above max_returned_rows should show max_returned_rows (5) | |
2021-07-11T02:17:19.0873513Z ( | |
2021-07-11T02:17:19.0873793Z 5, | |
2021-07-11T02:17:19.0874264Z "/fixtures/facetable?_facet=neighborhood&_facet_size=max", | |
2021-07-11T02:17:19.0874737Z 5, | |
2021-07-11T02:17:19.0875041Z True, | |
2021-07-11T02:17:19.0875340Z None, | |
2021-07-11T02:17:19.0875633Z ), | |
2021-07-11T02:17:19.0875902Z ), | |
2021-07-11T02:17:19.0876159Z ) | |
2021-07-11T02:17:19.0876501Z def test_facet_more_links( | |
2021-07-11T02:17:19.0876898Z max_returned_rows, | |
2021-07-11T02:17:19.0877227Z path, | |
2021-07-11T02:17:19.0877587Z expected_num_facets, | |
2021-07-11T02:17:19.0877995Z expected_ellipses, | |
2021-07-11T02:17:19.0878432Z expected_ellipses_url, | |
2021-07-11T02:17:19.0878781Z ): | |
2021-07-11T02:17:19.0879098Z with make_app_client( | |
2021-07-11T02:17:19.0879643Z config={"max_returned_rows": max_returned_rows, "default_facet_size": 2} | |
2021-07-11T02:17:19.0880142Z ) as client: | |
2021-07-11T02:17:19.0880646Z response = client.get(path) | |
2021-07-11T02:17:19.0881195Z soup = Soup(response.body, "html.parser") | |
2021-07-11T02:17:19.0881907Z lis = soup.select("#facet-neighborhood ul li:not(.facet-truncated)") | |
2021-07-11T02:17:19.0882640Z facet_truncated = soup.select_one(".facet-truncated") | |
2021-07-11T02:17:19.0883234Z assert len(lis) == expected_num_facets | |
2021-07-11T02:17:19.0883717Z if not expected_ellipses: | |
2021-07-11T02:17:19.0884178Z assert facet_truncated is None | |
2021-07-11T02:17:19.0884571Z else: | |
2021-07-11T02:17:19.0884949Z if expected_ellipses_url: | |
2021-07-11T02:17:19.0885548Z assert facet_truncated.find("a")["href"] == expected_ellipses_url | |
2021-07-11T02:17:19.0886068Z else: | |
2021-07-11T02:17:19.0886496Z > assert facet_truncated.find("a") is None | |
2021-07-11T02:17:19.0886823Z | |
2021-07-11T02:17:19.0887250Z D:\a\datasette\datasette\tests\test_html.py:1700: | |
2021-07-11T02:17:19.0887728Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0888295Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0888859Z next(self.gen) | |
2021-07-11T02:17:19.0889381Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0889938Z yield TestClient(ds) | |
2021-07-11T02:17:19.0890523Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0891121Z self.cleanup() | |
2021-07-11T02:17:19.0891695Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0892313Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0892899Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0893569Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0894206Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0894858Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0895318Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0895555Z | |
2021-07-11T02:17:19.0896005Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpzth9tnm4' | |
2021-07-11T02:17:19.0896661Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B77AA268> | |
2021-07-11T02:17:19.0897028Z | |
2021-07-11T02:17:19.0897393Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0897760Z try: | |
2021-07-11T02:17:19.0898136Z if os.path.islink(path): | |
2021-07-11T02:17:19.0898683Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0899274Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0899759Z except OSError: | |
2021-07-11T02:17:19.0900243Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0900853Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0901271Z return | |
2021-07-11T02:17:19.0901568Z names = [] | |
2021-07-11T02:17:19.0901866Z try: | |
2021-07-11T02:17:19.0902224Z names = os.listdir(path) | |
2021-07-11T02:17:19.0902612Z except OSError: | |
2021-07-11T02:17:19.0903082Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0903534Z for name in names: | |
2021-07-11T02:17:19.0903965Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0904365Z try: | |
2021-07-11T02:17:19.0904745Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0905177Z except OSError: | |
2021-07-11T02:17:19.0905525Z mode = 0 | |
2021-07-11T02:17:19.0905870Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0906334Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0906744Z else: | |
2021-07-11T02:17:19.0907046Z try: | |
2021-07-11T02:17:19.0907457Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0908417Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpzth9tnm4\\fixtures.db' | |
2021-07-11T02:17:19.0909187Z | |
2021-07-11T02:17:19.0909732Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0910493Z __________ test_unavailable_table_does_not_break_sort_relationships ___________ | |
2021-07-11T02:17:19.0911105Z | |
2021-07-11T02:17:19.0911582Z def test_unavailable_table_does_not_break_sort_relationships(): | |
2021-07-11T02:17:19.0912276Z # https://github.com/simonw/datasette/issues/1305 | |
2021-07-11T02:17:19.0912798Z with make_app_client( | |
2021-07-11T02:17:19.0913171Z metadata={ | |
2021-07-11T02:17:19.0913536Z "databases": { | |
2021-07-11T02:17:19.0914069Z "fixtures": {"tables": {"foreign_key_references": {"allow": False}}} | |
2021-07-11T02:17:19.0914523Z } | |
2021-07-11T02:17:19.0914805Z } | |
2021-07-11T02:17:19.0915101Z ) as client: | |
2021-07-11T02:17:19.0915577Z response = client.get("/?_sort=relationships") | |
2021-07-11T02:17:19.0916125Z > assert response.status == 200 | |
2021-07-11T02:17:19.0916421Z | |
2021-07-11T02:17:19.0916825Z D:\a\datasette\datasette\tests\test_html.py:1713: | |
2021-07-11T02:17:19.0917292Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0917868Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0918420Z next(self.gen) | |
2021-07-11T02:17:19.0918963Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0919519Z yield TestClient(ds) | |
2021-07-11T02:17:19.0920185Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0920802Z self.cleanup() | |
2021-07-11T02:17:19.0921373Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0921991Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0922588Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0923186Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0923824Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0924486Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0924937Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0925174Z | |
2021-07-11T02:17:19.0925639Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp8g2cfcvf' | |
2021-07-11T02:17:19.0926284Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B79F8E18> | |
2021-07-11T02:17:19.0926642Z | |
2021-07-11T02:17:19.0927009Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0927393Z try: | |
2021-07-11T02:17:19.0927761Z if os.path.islink(path): | |
2021-07-11T02:17:19.0928302Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0928911Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0929383Z except OSError: | |
2021-07-11T02:17:19.0929878Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0930451Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0930909Z return | |
2021-07-11T02:17:19.0931223Z names = [] | |
2021-07-11T02:17:19.0931507Z try: | |
2021-07-11T02:17:19.0931869Z names = os.listdir(path) | |
2021-07-11T02:17:19.0932276Z except OSError: | |
2021-07-11T02:17:19.0932728Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0933179Z for name in names: | |
2021-07-11T02:17:19.0933627Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0934016Z try: | |
2021-07-11T02:17:19.0934466Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0934901Z except OSError: | |
2021-07-11T02:17:19.0935244Z mode = 0 | |
2021-07-11T02:17:19.0935605Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0936048Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0936461Z else: | |
2021-07-11T02:17:19.0936766Z try: | |
2021-07-11T02:17:19.0937109Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0938048Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp8g2cfcvf\\fixtures.db' | |
2021-07-11T02:17:19.0938809Z | |
2021-07-11T02:17:19.0939368Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0940047Z ______________________ test_view_database[None-200-200] _______________________ | |
2021-07-11T02:17:19.0940363Z | |
2021-07-11T02:17:19.0940822Z allow = None, expected_anon = 200, expected_auth = 200 | |
2021-07-11T02:17:19.0941149Z | |
2021-07-11T02:17:19.0941561Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.0942146Z "allow,expected_anon,expected_auth", | |
2021-07-11T02:17:19.0942573Z [ | |
2021-07-11T02:17:19.0942857Z (None, 200, 200), | |
2021-07-11T02:17:19.0943170Z ({}, 403, 403), | |
2021-07-11T02:17:19.0943478Z ({"id": "root"}, 403, 200), | |
2021-07-11T02:17:19.0943781Z ], | |
2021-07-11T02:17:19.0944048Z ) | |
2021-07-11T02:17:19.0944502Z def test_view_database(allow, expected_anon, expected_auth): | |
2021-07-11T02:17:19.0945025Z with make_app_client( | |
2021-07-11T02:17:19.0945518Z metadata={"databases": {"fixtures": {"allow": allow}}} | |
2021-07-11T02:17:19.0945952Z ) as client: | |
2021-07-11T02:17:19.0946353Z for path in ( | |
2021-07-11T02:17:19.0946689Z "/fixtures", | |
2021-07-11T02:17:19.0947148Z "/fixtures/compound_three_primary_keys", | |
2021-07-11T02:17:19.0947714Z "/fixtures/compound_three_primary_keys/a,a,a", | |
2021-07-11T02:17:19.0948124Z ): | |
2021-07-11T02:17:19.0948528Z anon_response = client.get(path) | |
2021-07-11T02:17:19.0949116Z assert expected_anon == anon_response.status, path | |
2021-07-11T02:17:19.0949771Z if allow and path == "/fixtures" and anon_response.status == 200: | |
2021-07-11T02:17:19.0950309Z # Should be no padlock | |
2021-07-11T02:17:19.0950895Z assert ">fixtures \U0001f512</h1>" not in anon_response.text | |
2021-07-11T02:17:19.0951439Z auth_response = client.get( | |
2021-07-11T02:17:19.0951839Z path, | |
2021-07-11T02:17:19.0952335Z cookies={"ds_actor": client.actor_cookie({"id": "root"})}, | |
2021-07-11T02:17:19.0952767Z ) | |
2021-07-11T02:17:19.0953222Z assert expected_auth == auth_response.status | |
2021-07-11T02:17:19.0953674Z if ( | |
2021-07-11T02:17:19.0953971Z allow | |
2021-07-11T02:17:19.0954341Z and path == "/fixtures" | |
2021-07-11T02:17:19.0954758Z and expected_anon == 403 | |
2021-07-11T02:17:19.0955181Z and expected_auth == 200 | |
2021-07-11T02:17:19.0955531Z ): | |
2021-07-11T02:17:19.0955969Z > assert ">fixtures \U0001f512</h1>" in auth_response.text | |
2021-07-11T02:17:19.0956329Z | |
2021-07-11T02:17:19.0956799Z D:\a\datasette\datasette\tests\test_permissions.py:72: | |
2021-07-11T02:17:19.0957319Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0957878Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0958441Z next(self.gen) | |
2021-07-11T02:17:19.0958980Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.0959522Z yield TestClient(ds) | |
2021-07-11T02:17:19.0960154Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.0960752Z self.cleanup() | |
2021-07-11T02:17:19.0961329Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.0961953Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.0962536Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.0963147Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.0963780Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.0964426Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.0964884Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0965123Z | |
2021-07-11T02:17:19.0965586Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpdt95etnl' | |
2021-07-11T02:17:19.0966216Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B8D87378> | |
2021-07-11T02:17:19.0966578Z | |
2021-07-11T02:17:19.0966947Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.0967316Z try: | |
2021-07-11T02:17:19.0967689Z if os.path.islink(path): | |
2021-07-11T02:17:19.0968230Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.0968818Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.0969301Z except OSError: | |
2021-07-11T02:17:19.0969792Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.0970351Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.0970991Z return | |
2021-07-11T02:17:19.0971295Z names = [] | |
2021-07-11T02:17:19.0971598Z try: | |
2021-07-11T02:17:19.0971961Z names = os.listdir(path) | |
2021-07-11T02:17:19.0972440Z except OSError: | |
2021-07-11T02:17:19.0972910Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.0973362Z for name in names: | |
2021-07-11T02:17:19.0973796Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.0974200Z try: | |
2021-07-11T02:17:19.0974590Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.0975002Z except OSError: | |
2021-07-11T02:17:19.0975359Z mode = 0 | |
2021-07-11T02:17:19.0975710Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.0976171Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.0976578Z else: | |
2021-07-11T02:17:19.0976874Z try: | |
2021-07-11T02:17:19.0977237Z > os.unlink(fullname) | |
2021-07-11T02:17:19.0978190Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpdt95etnl\\fixtures.db' | |
2021-07-11T02:17:19.0978965Z | |
2021-07-11T02:17:19.0979507Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.0980201Z _____________________ test_view_database[allow1-403-403] ______________________ | |
2021-07-11T02:17:19.0980572Z | |
2021-07-11T02:17:19.0980956Z allow = {}, expected_anon = 403, expected_auth = 403 | |
2021-07-11T02:17:19.0981268Z | |
2021-07-11T02:17:19.0981687Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.0982270Z "allow,expected_anon,expected_auth", | |
2021-07-11T02:17:19.0982682Z [ | |
2021-07-11T02:17:19.0982980Z (None, 200, 200), | |
2021-07-11T02:17:19.0983276Z ({}, 403, 403), | |
2021-07-11T02:17:19.0983595Z ({"id": "root"}, 403, 200), | |
2021-07-11T02:17:19.0983901Z ], | |
2021-07-11T02:17:19.0984157Z ) | |
2021-07-11T02:17:19.0984624Z def test_view_database(allow, expected_anon, expected_auth): | |
2021-07-11T02:17:19.0985148Z with make_app_client( | |
2021-07-11T02:17:19.0985627Z metadata={"databases": {"fixtures": {"allow": allow}}} | |
2021-07-11T02:17:19.0986071Z ) as client: | |
2021-07-11T02:17:19.0986407Z for path in ( | |
2021-07-11T02:17:19.0986802Z "/fixtures", | |
2021-07-11T02:17:19.0987259Z "/fixtures/compound_three_primary_keys", | |
2021-07-11T02:17:19.0987807Z "/fixtures/compound_three_primary_keys/a,a,a", | |
2021-07-11T02:17:19.0988227Z ): | |
2021-07-11T02:17:19.0988625Z anon_response = client.get(path) | |
2021-07-11T02:17:19.0989197Z assert expected_anon == anon_response.status, path | |
2021-07-11T02:17:19.0989865Z if allow and path == "/fixtures" and anon_response.status == 200: | |
2021-07-11T02:17:19.0990409Z # Should be no padlock | |
2021-07-11T02:17:19.0990977Z assert ">fixtures \U0001f512</h1>" not in anon_response.text | |
2021-07-11T02:17:19.0991535Z auth_response = client.get( | |
2021-07-11T02:17:19.0991942Z path, | |
2021-07-11T02:17:19.0992397Z cookies={"ds_actor": client.actor_cookie({"id": "root"})}, | |
2021-07-11T02:17:19.0992836Z ) | |
2021-07-11T02:17:19.0993297Z assert expected_auth == auth_response.status | |
2021-07-11T02:17:19.0993732Z if ( | |
2021-07-11T02:17:19.0994047Z allow | |
2021-07-11T02:17:19.0994408Z and path == "/fixtures" | |
2021-07-11T02:17:19.0994831Z and expected_anon == 403 | |
2021-07-11T02:17:19.0995252Z and expected_auth == 200 | |
2021-07-11T02:17:19.0995587Z ): | |
2021-07-11T02:17:19.0996037Z > assert ">fixtures \U0001f512</h1>" in auth_response.text | |
2021-07-11T02:17:19.0996399Z | |
2021-07-11T02:17:19.0996864Z D:\a\datasette\datasette\tests\test_permissions.py:72: | |
2021-07-11T02:17:19.0997366Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.0998629Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.0999196Z next(self.gen) | |
2021-07-11T02:17:19.0999727Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1000293Z yield TestClient(ds) | |
2021-07-11T02:17:19.1000937Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1001498Z self.cleanup() | |
2021-07-11T02:17:19.1002080Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1002685Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1003285Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1003897Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1004525Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1005187Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1005657Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1005896Z | |
2021-07-11T02:17:19.1006331Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp33an3k__' | |
2021-07-11T02:17:19.1006966Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B8C1AAE8> | |
2021-07-11T02:17:19.1007338Z | |
2021-07-11T02:17:19.1007694Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1008079Z try: | |
2021-07-11T02:17:19.1008456Z if os.path.islink(path): | |
2021-07-11T02:17:19.1008982Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1009586Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1010068Z except OSError: | |
2021-07-11T02:17:19.1010590Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1011162Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1011572Z return | |
2021-07-11T02:17:19.1011884Z names = [] | |
2021-07-11T02:17:19.1012188Z try: | |
2021-07-11T02:17:19.1012535Z names = os.listdir(path) | |
2021-07-11T02:17:19.1012939Z except OSError: | |
2021-07-11T02:17:19.1013471Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1013912Z for name in names: | |
2021-07-11T02:17:19.1014353Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1014755Z try: | |
2021-07-11T02:17:19.1015131Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1015561Z except OSError: | |
2021-07-11T02:17:19.1015901Z mode = 0 | |
2021-07-11T02:17:19.1016260Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1016717Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1017110Z else: | |
2021-07-11T02:17:19.1017415Z try: | |
2021-07-11T02:17:19.1017770Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1018701Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp33an3k__\\fixtures.db' | |
2021-07-11T02:17:19.1019465Z | |
2021-07-11T02:17:19.1020026Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1020775Z _____________________ test_view_database[allow2-403-200] ______________________ | |
2021-07-11T02:17:19.1021089Z | |
2021-07-11T02:17:19.1021505Z allow = {'id': 'root'}, expected_anon = 403, expected_auth = 200 | |
2021-07-11T02:17:19.1021841Z | |
2021-07-11T02:17:19.1022261Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1022835Z "allow,expected_anon,expected_auth", | |
2021-07-11T02:17:19.1023262Z [ | |
2021-07-11T02:17:19.1023553Z (None, 200, 200), | |
2021-07-11T02:17:19.1023868Z ({}, 403, 403), | |
2021-07-11T02:17:19.1024195Z ({"id": "root"}, 403, 200), | |
2021-07-11T02:17:19.1024494Z ], | |
2021-07-11T02:17:19.1024759Z ) | |
2021-07-11T02:17:19.1025229Z def test_view_database(allow, expected_anon, expected_auth): | |
2021-07-11T02:17:19.1025810Z with make_app_client( | |
2021-07-11T02:17:19.1026303Z metadata={"databases": {"fixtures": {"allow": allow}}} | |
2021-07-11T02:17:19.1026750Z ) as client: | |
2021-07-11T02:17:19.1027075Z for path in ( | |
2021-07-11T02:17:19.1027425Z "/fixtures", | |
2021-07-11T02:17:19.1027872Z "/fixtures/compound_three_primary_keys", | |
2021-07-11T02:17:19.1028439Z "/fixtures/compound_three_primary_keys/a,a,a", | |
2021-07-11T02:17:19.1028857Z ): | |
2021-07-11T02:17:19.1029243Z anon_response = client.get(path) | |
2021-07-11T02:17:19.1029829Z assert expected_anon == anon_response.status, path | |
2021-07-11T02:17:19.1030497Z if allow and path == "/fixtures" and anon_response.status == 200: | |
2021-07-11T02:17:19.1031070Z # Should be no padlock | |
2021-07-11T02:17:19.1031604Z assert ">fixtures \U0001f512</h1>" not in anon_response.text | |
2021-07-11T02:17:19.1032156Z auth_response = client.get( | |
2021-07-11T02:17:19.1032543Z path, | |
2021-07-11T02:17:19.1033017Z cookies={"ds_actor": client.actor_cookie({"id": "root"})}, | |
2021-07-11T02:17:19.1033458Z ) | |
2021-07-11T02:17:19.1033900Z assert expected_auth == auth_response.status | |
2021-07-11T02:17:19.1034346Z if ( | |
2021-07-11T02:17:19.1034656Z allow | |
2021-07-11T02:17:19.1035013Z and path == "/fixtures" | |
2021-07-11T02:17:19.1035436Z and expected_anon == 403 | |
2021-07-11T02:17:19.1035846Z and expected_auth == 200 | |
2021-07-11T02:17:19.1036192Z ): | |
2021-07-11T02:17:19.1036644Z > assert ">fixtures \U0001f512</h1>" in auth_response.text | |
2021-07-11T02:17:19.1037005Z | |
2021-07-11T02:17:19.1037463Z D:\a\datasette\datasette\tests\test_permissions.py:72: | |
2021-07-11T02:17:19.1037985Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1038608Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1039162Z next(self.gen) | |
2021-07-11T02:17:19.1039694Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1040239Z yield TestClient(ds) | |
2021-07-11T02:17:19.1040880Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1041455Z self.cleanup() | |
2021-07-11T02:17:19.1042025Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1042645Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1043248Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1043842Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1044482Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1045148Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1045600Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1045835Z | |
2021-07-11T02:17:19.1046285Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpcj0f_7io' | |
2021-07-11T02:17:19.1046902Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B79E11E0> | |
2021-07-11T02:17:19.1047267Z | |
2021-07-11T02:17:19.1047635Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1048015Z try: | |
2021-07-11T02:17:19.1048376Z if os.path.islink(path): | |
2021-07-11T02:17:19.1048919Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1049527Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1049995Z except OSError: | |
2021-07-11T02:17:19.1050494Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1051115Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1051586Z return | |
2021-07-11T02:17:19.1051897Z names = [] | |
2021-07-11T02:17:19.1052208Z try: | |
2021-07-11T02:17:19.1052573Z names = os.listdir(path) | |
2021-07-11T02:17:19.1052977Z except OSError: | |
2021-07-11T02:17:19.1053429Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1053886Z for name in names: | |
2021-07-11T02:17:19.1054330Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1054716Z try: | |
2021-07-11T02:17:19.1055104Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1055522Z except OSError: | |
2021-07-11T02:17:19.1055876Z mode = 0 | |
2021-07-11T02:17:19.1056237Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1056685Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1057093Z else: | |
2021-07-11T02:17:19.1057397Z try: | |
2021-07-11T02:17:19.1057744Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1058687Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpcj0f_7io\\fixtures.db' | |
2021-07-11T02:17:19.1059438Z | |
2021-07-11T02:17:19.1059995Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1060750Z __________________ test_database_list_respects_view_database __________________ | |
2021-07-11T02:17:19.1061097Z | |
2021-07-11T02:17:19.1061517Z def test_database_list_respects_view_database(): | |
2021-07-11T02:17:19.1061982Z with make_app_client( | |
2021-07-11T02:17:19.1062482Z metadata={"databases": {"fixtures": {"allow": {"id": "root"}}}}, | |
2021-07-11T02:17:19.1063091Z extra_databases={"data.db": "create table names (name text)"}, | |
2021-07-11T02:17:19.1063561Z ) as client: | |
2021-07-11T02:17:19.1063967Z anon_response = client.get("/") | |
2021-07-11T02:17:19.1064512Z assert '<a href="/data">data</a></h2>' in anon_response.text | |
2021-07-11T02:17:19.1065208Z assert '<a href="/fixtures">fixtures</a>' not in anon_response.text | |
2021-07-11T02:17:19.1065784Z auth_response = client.get( | |
2021-07-11T02:17:19.1066160Z "/", | |
2021-07-11T02:17:19.1066596Z cookies={"ds_actor": client.actor_cookie({"id": "root"})}, | |
2021-07-11T02:17:19.1067030Z ) | |
2021-07-11T02:17:19.1067463Z assert '<a href="/data">data</a></h2>' in auth_response.text | |
2021-07-11T02:17:19.1068125Z > assert '<a href="/fixtures">fixtures</a> \U0001f512</h2>' in auth_response.text | |
2021-07-11T02:17:19.1068537Z | |
2021-07-11T02:17:19.1069001Z D:\a\datasette\datasette\tests\test_permissions.py:88: | |
2021-07-11T02:17:19.1069506Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1070080Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1070882Z next(self.gen) | |
2021-07-11T02:17:19.1071423Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1071978Z yield TestClient(ds) | |
2021-07-11T02:17:19.1072561Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1073117Z self.cleanup() | |
2021-07-11T02:17:19.1073697Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1074315Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1074896Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1075501Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1076129Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1076801Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1077257Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1077571Z | |
2021-07-11T02:17:19.1078028Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmprhdgnla1' | |
2021-07-11T02:17:19.1078683Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B90C4AE8> | |
2021-07-11T02:17:19.1079051Z | |
2021-07-11T02:17:19.1079409Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1079790Z try: | |
2021-07-11T02:17:19.1080167Z if os.path.islink(path): | |
2021-07-11T02:17:19.1080746Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1081349Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1081830Z except OSError: | |
2021-07-11T02:17:19.1082308Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1082881Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1083313Z return | |
2021-07-11T02:17:19.1083611Z names = [] | |
2021-07-11T02:17:19.1083909Z try: | |
2021-07-11T02:17:19.1084258Z names = os.listdir(path) | |
2021-07-11T02:17:19.1084661Z except OSError: | |
2021-07-11T02:17:19.1085126Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1085563Z for name in names: | |
2021-07-11T02:17:19.1086006Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1086408Z try: | |
2021-07-11T02:17:19.1086785Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1087219Z except OSError: | |
2021-07-11T02:17:19.1087573Z mode = 0 | |
2021-07-11T02:17:19.1087921Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1088375Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1088774Z else: | |
2021-07-11T02:17:19.1089086Z try: | |
2021-07-11T02:17:19.1089443Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1090358Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmprhdgnla1\\data.db' | |
2021-07-11T02:17:19.1091156Z | |
2021-07-11T02:17:19.1091778Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1092483Z ___________________ test_database_list_respects_view_table ____________________ | |
2021-07-11T02:17:19.1092818Z | |
2021-07-11T02:17:19.1093210Z def test_database_list_respects_view_table(): | |
2021-07-11T02:17:19.1093677Z with make_app_client( | |
2021-07-11T02:17:19.1094041Z metadata={ | |
2021-07-11T02:17:19.1094406Z "databases": { | |
2021-07-11T02:17:19.1094754Z "data": { | |
2021-07-11T02:17:19.1095080Z "tables": { | |
2021-07-11T02:17:19.1095479Z "names": {"allow": {"id": "root"}}, | |
2021-07-11T02:17:19.1095899Z "v": {"allow": {"id": "root"}}, | |
2021-07-11T02:17:19.1096236Z } | |
2021-07-11T02:17:19.1096541Z } | |
2021-07-11T02:17:19.1096826Z } | |
2021-07-11T02:17:19.1097093Z }, | |
2021-07-11T02:17:19.1097432Z extra_databases={ | |
2021-07-11T02:17:19.1097994Z "data.db": "create table names (name text); create view v as select * from names" | |
2021-07-11T02:17:19.1098492Z }, | |
2021-07-11T02:17:19.1098797Z ) as client: | |
2021-07-11T02:17:19.1099139Z html_fragments = [ | |
2021-07-11T02:17:19.1099521Z ">names</a> \U0001f512", | |
2021-07-11T02:17:19.1099880Z ">v</a> \U0001f512", | |
2021-07-11T02:17:19.1100173Z ] | |
2021-07-11T02:17:19.1100623Z anon_response_text = client.get("/").text | |
2021-07-11T02:17:19.1101161Z assert "0 rows in 0 tables" in anon_response_text | |
2021-07-11T02:17:19.1101668Z for html_fragment in html_fragments: | |
2021-07-11T02:17:19.1102211Z assert html_fragment not in anon_response_text | |
2021-07-11T02:17:19.1102796Z auth_response_text = client.get( | |
2021-07-11T02:17:19.1103170Z "/", | |
2021-07-11T02:17:19.1103617Z cookies={"ds_actor": client.actor_cookie({"id": "root"})}, | |
2021-07-11T02:17:19.1104056Z ).text | |
2021-07-11T02:17:19.1104469Z for html_fragment in html_fragments: | |
2021-07-11T02:17:19.1104991Z > assert html_fragment in auth_response_text | |
2021-07-11T02:17:19.1105317Z | |
2021-07-11T02:17:19.1105774Z D:\a\datasette\datasette\tests\test_permissions.py:120: | |
2021-07-11T02:17:19.1106296Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1106868Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1107409Z next(self.gen) | |
2021-07-11T02:17:19.1107946Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1108485Z yield TestClient(ds) | |
2021-07-11T02:17:19.1109070Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1109634Z self.cleanup() | |
2021-07-11T02:17:19.1110195Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1110863Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1111466Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1112065Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1112705Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1113370Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1113813Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1114047Z | |
2021-07-11T02:17:19.1114507Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpafmbrw2l' | |
2021-07-11T02:17:19.1115152Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B8E25620> | |
2021-07-11T02:17:19.1115505Z | |
2021-07-11T02:17:19.1115872Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1116261Z try: | |
2021-07-11T02:17:19.1116623Z if os.path.islink(path): | |
2021-07-11T02:17:19.1117213Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1117826Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1118297Z except OSError: | |
2021-07-11T02:17:19.1118793Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1119362Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1119775Z return | |
2021-07-11T02:17:19.1120090Z names = [] | |
2021-07-11T02:17:19.1120377Z try: | |
2021-07-11T02:17:19.1120791Z names = os.listdir(path) | |
2021-07-11T02:17:19.1121192Z except OSError: | |
2021-07-11T02:17:19.1121644Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1122094Z for name in names: | |
2021-07-11T02:17:19.1122538Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1122930Z try: | |
2021-07-11T02:17:19.1123317Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1123751Z except OSError: | |
2021-07-11T02:17:19.1124095Z mode = 0 | |
2021-07-11T02:17:19.1124453Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1124898Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1125309Z else: | |
2021-07-11T02:17:19.1125618Z try: | |
2021-07-11T02:17:19.1125963Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1126892Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpafmbrw2l\\data.db' | |
2021-07-11T02:17:19.1127640Z | |
2021-07-11T02:17:19.1128196Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1128856Z ________________________ test_view_table[None-200-200] ________________________ | |
2021-07-11T02:17:19.1129217Z | |
2021-07-11T02:17:19.1129629Z allow = None, expected_anon = 200, expected_auth = 200 | |
2021-07-11T02:17:19.1129958Z | |
2021-07-11T02:17:19.1130369Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1131000Z "allow,expected_anon,expected_auth", | |
2021-07-11T02:17:19.1131414Z [ | |
2021-07-11T02:17:19.1131713Z (None, 200, 200), | |
2021-07-11T02:17:19.1132024Z ({}, 403, 403), | |
2021-07-11T02:17:19.1132328Z ({"id": "root"}, 403, 200), | |
2021-07-11T02:17:19.1132633Z ], | |
2021-07-11T02:17:19.1132902Z ) | |
2021-07-11T02:17:19.1133340Z def test_view_table(allow, expected_anon, expected_auth): | |
2021-07-11T02:17:19.1133852Z with make_app_client( | |
2021-07-11T02:17:19.1134224Z metadata={ | |
2021-07-11T02:17:19.1134570Z "databases": { | |
2021-07-11T02:17:19.1134944Z "fixtures": { | |
2021-07-11T02:17:19.1135426Z "tables": {"compound_three_primary_keys": {"allow": allow}} | |
2021-07-11T02:17:19.1135878Z } | |
2021-07-11T02:17:19.1136169Z } | |
2021-07-11T02:17:19.1136436Z } | |
2021-07-11T02:17:19.1136746Z ) as client: | |
2021-07-11T02:17:19.1137284Z anon_response = client.get("/fixtures/compound_three_primary_keys") | |
2021-07-11T02:17:19.1137938Z assert expected_anon == anon_response.status | |
2021-07-11T02:17:19.1138509Z if allow and anon_response.status == 200: | |
2021-07-11T02:17:19.1138979Z # Should be no padlock | |
2021-07-11T02:17:19.1139558Z assert ">compound_three_primary_keys \U0001f512</h1>" not in anon_response.text | |
2021-07-11T02:17:19.1140162Z auth_response = client.get( | |
2021-07-11T02:17:19.1140722Z "/fixtures/compound_three_primary_keys", | |
2021-07-11T02:17:19.1141282Z cookies={"ds_actor": client.actor_cookie({"id": "root"})}, | |
2021-07-11T02:17:19.1141712Z ) | |
2021-07-11T02:17:19.1142165Z assert expected_auth == auth_response.status | |
2021-07-11T02:17:19.1142748Z if allow and expected_anon == 403 and expected_auth == 200: | |
2021-07-11T02:17:19.1143459Z > assert ">compound_three_primary_keys \U0001f512</h1>" in auth_response.text | |
2021-07-11T02:17:19.1143876Z | |
2021-07-11T02:17:19.1144331Z D:\a\datasette\datasette\tests\test_permissions.py:152: | |
2021-07-11T02:17:19.1144850Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1145422Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1145970Z next(self.gen) | |
2021-07-11T02:17:19.1146506Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1147065Z yield TestClient(ds) | |
2021-07-11T02:17:19.1147638Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1148205Z self.cleanup() | |
2021-07-11T02:17:19.1148788Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1149390Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1149995Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1150638Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1151279Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1151945Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1152416Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1152652Z | |
2021-07-11T02:17:19.1153120Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpses2qc33' | |
2021-07-11T02:17:19.1153762Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B8E25048> | |
2021-07-11T02:17:19.1154113Z | |
2021-07-11T02:17:19.1154480Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1154868Z try: | |
2021-07-11T02:17:19.1155230Z if os.path.islink(path): | |
2021-07-11T02:17:19.1155828Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1156440Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1156911Z except OSError: | |
2021-07-11T02:17:19.1157404Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1157974Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1158384Z return | |
2021-07-11T02:17:19.1158696Z names = [] | |
2021-07-11T02:17:19.1158995Z try: | |
2021-07-11T02:17:19.1159342Z names = os.listdir(path) | |
2021-07-11T02:17:19.1159749Z except OSError: | |
2021-07-11T02:17:19.1160198Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1160702Z for name in names: | |
2021-07-11T02:17:19.1161149Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1161537Z try: | |
2021-07-11T02:17:19.1161934Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1162365Z except OSError: | |
2021-07-11T02:17:19.1162706Z mode = 0 | |
2021-07-11T02:17:19.1163068Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1163528Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1163933Z else: | |
2021-07-11T02:17:19.1164241Z try: | |
2021-07-11T02:17:19.1164585Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1165543Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpses2qc33\\fixtures.db' | |
2021-07-11T02:17:19.1166314Z | |
2021-07-11T02:17:19.1166871Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1167540Z _______________________ test_view_table[allow1-403-403] _______________________ | |
2021-07-11T02:17:19.1167849Z | |
2021-07-11T02:17:19.1168251Z allow = {}, expected_anon = 403, expected_auth = 403 | |
2021-07-11T02:17:19.1168570Z | |
2021-07-11T02:17:19.1168974Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1169565Z "allow,expected_anon,expected_auth", | |
2021-07-11T02:17:19.1170043Z [ | |
2021-07-11T02:17:19.1170335Z (None, 200, 200), | |
2021-07-11T02:17:19.1170694Z ({}, 403, 403), | |
2021-07-11T02:17:19.1171003Z ({"id": "root"}, 403, 200), | |
2021-07-11T02:17:19.1171316Z ], | |
2021-07-11T02:17:19.1171584Z ) | |
2021-07-11T02:17:19.1172025Z def test_view_table(allow, expected_anon, expected_auth): | |
2021-07-11T02:17:19.1172533Z with make_app_client( | |
2021-07-11T02:17:19.1172905Z metadata={ | |
2021-07-11T02:17:19.1173262Z "databases": { | |
2021-07-11T02:17:19.1173629Z "fixtures": { | |
2021-07-11T02:17:19.1174124Z "tables": {"compound_three_primary_keys": {"allow": allow}} | |
2021-07-11T02:17:19.1174565Z } | |
2021-07-11T02:17:19.1174861Z } | |
2021-07-11T02:17:19.1175131Z } | |
2021-07-11T02:17:19.1175438Z ) as client: | |
2021-07-11T02:17:19.1175977Z anon_response = client.get("/fixtures/compound_three_primary_keys") | |
2021-07-11T02:17:19.1176631Z assert expected_anon == anon_response.status | |
2021-07-11T02:17:19.1177200Z if allow and anon_response.status == 200: | |
2021-07-11T02:17:19.1177668Z # Should be no padlock | |
2021-07-11T02:17:19.1178245Z assert ">compound_three_primary_keys \U0001f512</h1>" not in anon_response.text | |
2021-07-11T02:17:19.1178854Z auth_response = client.get( | |
2021-07-11T02:17:19.1179363Z "/fixtures/compound_three_primary_keys", | |
2021-07-11T02:17:19.1179926Z cookies={"ds_actor": client.actor_cookie({"id": "root"})}, | |
2021-07-11T02:17:19.1180355Z ) | |
2021-07-11T02:17:19.1180843Z assert expected_auth == auth_response.status | |
2021-07-11T02:17:19.1181422Z if allow and expected_anon == 403 and expected_auth == 200: | |
2021-07-11T02:17:19.1182130Z > assert ">compound_three_primary_keys \U0001f512</h1>" in auth_response.text | |
2021-07-11T02:17:19.1182550Z | |
2021-07-11T02:17:19.1183011Z D:\a\datasette\datasette\tests\test_permissions.py:152: | |
2021-07-11T02:17:19.1183528Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1184100Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1184652Z next(self.gen) | |
2021-07-11T02:17:19.1185188Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1185745Z yield TestClient(ds) | |
2021-07-11T02:17:19.1186317Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1186884Z self.cleanup() | |
2021-07-11T02:17:19.1187458Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1188066Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1188668Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1189275Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1189894Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1190611Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1191080Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1191305Z | |
2021-07-11T02:17:19.1191761Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpntw6095m' | |
2021-07-11T02:17:19.1192395Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B8E7F2F0> | |
2021-07-11T02:17:19.1192766Z | |
2021-07-11T02:17:19.1193123Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1193507Z try: | |
2021-07-11T02:17:19.1193864Z if os.path.islink(path): | |
2021-07-11T02:17:19.1194403Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1195012Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1195481Z except OSError: | |
2021-07-11T02:17:19.1196031Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1196610Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1197028Z return | |
2021-07-11T02:17:19.1197340Z names = [] | |
2021-07-11T02:17:19.1197640Z try: | |
2021-07-11T02:17:19.1197994Z names = os.listdir(path) | |
2021-07-11T02:17:19.1198396Z except OSError: | |
2021-07-11T02:17:19.1198860Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1199296Z for name in names: | |
2021-07-11T02:17:19.1199741Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1200134Z try: | |
2021-07-11T02:17:19.1200521Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1200998Z except OSError: | |
2021-07-11T02:17:19.1201342Z mode = 0 | |
2021-07-11T02:17:19.1201703Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1202163Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1202560Z else: | |
2021-07-11T02:17:19.1202867Z try: | |
2021-07-11T02:17:19.1203227Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1204165Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpntw6095m\\fixtures.db' | |
2021-07-11T02:17:19.1204923Z | |
2021-07-11T02:17:19.1205481Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1206146Z _______________________ test_view_table[allow2-403-200] _______________________ | |
2021-07-11T02:17:19.1206457Z | |
2021-07-11T02:17:19.1206875Z allow = {'id': 'root'}, expected_anon = 403, expected_auth = 200 | |
2021-07-11T02:17:19.1207209Z | |
2021-07-11T02:17:19.1207621Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1208254Z "allow,expected_anon,expected_auth", | |
2021-07-11T02:17:19.1208680Z [ | |
2021-07-11T02:17:19.1208966Z (None, 200, 200), | |
2021-07-11T02:17:19.1209281Z ({}, 403, 403), | |
2021-07-11T02:17:19.1209605Z ({"id": "root"}, 403, 200), | |
2021-07-11T02:17:19.1209898Z ], | |
2021-07-11T02:17:19.1210163Z ) | |
2021-07-11T02:17:19.1210649Z def test_view_table(allow, expected_anon, expected_auth): | |
2021-07-11T02:17:19.1211159Z with make_app_client( | |
2021-07-11T02:17:19.1211534Z metadata={ | |
2021-07-11T02:17:19.1211880Z "databases": { | |
2021-07-11T02:17:19.1212245Z "fixtures": { | |
2021-07-11T02:17:19.1212740Z "tables": {"compound_three_primary_keys": {"allow": allow}} | |
2021-07-11T02:17:19.1213178Z } | |
2021-07-11T02:17:19.1213467Z } | |
2021-07-11T02:17:19.1213749Z } | |
2021-07-11T02:17:19.1214041Z ) as client: | |
2021-07-11T02:17:19.1214585Z anon_response = client.get("/fixtures/compound_three_primary_keys") | |
2021-07-11T02:17:19.1215257Z assert expected_anon == anon_response.status | |
2021-07-11T02:17:19.1215819Z if allow and anon_response.status == 200: | |
2021-07-11T02:17:19.1216289Z # Should be no padlock | |
2021-07-11T02:17:19.1216865Z assert ">compound_three_primary_keys \U0001f512</h1>" not in anon_response.text | |
2021-07-11T02:17:19.1217471Z auth_response = client.get( | |
2021-07-11T02:17:19.1217982Z "/fixtures/compound_three_primary_keys", | |
2021-07-11T02:17:19.1218546Z cookies={"ds_actor": client.actor_cookie({"id": "root"})}, | |
2021-07-11T02:17:19.1218979Z ) | |
2021-07-11T02:17:19.1219430Z assert expected_auth == auth_response.status | |
2021-07-11T02:17:19.1220015Z if allow and expected_anon == 403 and expected_auth == 200: | |
2021-07-11T02:17:19.1222664Z > assert ">compound_three_primary_keys \U0001f512</h1>" in auth_response.text | |
2021-07-11T02:17:19.1223128Z | |
2021-07-11T02:17:19.1223612Z D:\a\datasette\datasette\tests\test_permissions.py:152: | |
2021-07-11T02:17:19.1224247Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1224830Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1225400Z next(self.gen) | |
2021-07-11T02:17:19.1225926Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1226482Z yield TestClient(ds) | |
2021-07-11T02:17:19.1227057Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1227629Z self.cleanup() | |
2021-07-11T02:17:19.1228205Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1228819Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1229418Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1230033Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1230868Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1231557Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1232020Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1232260Z | |
2021-07-11T02:17:19.1232710Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmph32d5byh' | |
2021-07-11T02:17:19.1233351Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B8B377B8> | |
2021-07-11T02:17:19.1233718Z | |
2021-07-11T02:17:19.1234078Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1234461Z try: | |
2021-07-11T02:17:19.1234839Z if os.path.islink(path): | |
2021-07-11T02:17:19.1235374Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1235982Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1236545Z except OSError: | |
2021-07-11T02:17:19.1237029Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1237603Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1238025Z return | |
2021-07-11T02:17:19.1238325Z names = [] | |
2021-07-11T02:17:19.1238629Z try: | |
2021-07-11T02:17:19.1238976Z names = os.listdir(path) | |
2021-07-11T02:17:19.1239377Z except OSError: | |
2021-07-11T02:17:19.1239845Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1240282Z for name in names: | |
2021-07-11T02:17:19.1240787Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1241190Z try: | |
2021-07-11T02:17:19.1241573Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1242004Z except OSError: | |
2021-07-11T02:17:19.1242353Z mode = 0 | |
2021-07-11T02:17:19.1242717Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1243181Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1243585Z else: | |
2021-07-11T02:17:19.1243895Z try: | |
2021-07-11T02:17:19.1244263Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1245203Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmph32d5byh\\fixtures.db' | |
2021-07-11T02:17:19.1245969Z | |
2021-07-11T02:17:19.1246526Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1247222Z _____________________ test_table_list_respects_view_table _____________________ | |
2021-07-11T02:17:19.1247531Z | |
2021-07-11T02:17:19.1247926Z def test_table_list_respects_view_table(): | |
2021-07-11T02:17:19.1248378Z with make_app_client( | |
2021-07-11T02:17:19.1248741Z metadata={ | |
2021-07-11T02:17:19.1249105Z "databases": { | |
2021-07-11T02:17:19.1249480Z "fixtures": { | |
2021-07-11T02:17:19.1249834Z "tables": { | |
2021-07-11T02:17:19.1250375Z "compound_three_primary_keys": {"allow": {"id": "root"}}, | |
2021-07-11T02:17:19.1250926Z # And a SQL view too: | |
2021-07-11T02:17:19.1251377Z "paginated_view": {"allow": {"id": "root"}}, | |
2021-07-11T02:17:19.1251782Z } | |
2021-07-11T02:17:19.1252068Z } | |
2021-07-11T02:17:19.1252385Z } | |
2021-07-11T02:17:19.1252670Z } | |
2021-07-11T02:17:19.1252967Z ) as client: | |
2021-07-11T02:17:19.1253326Z html_fragments = [ | |
2021-07-11T02:17:19.1253796Z ">compound_three_primary_keys</a> \U0001f512", | |
2021-07-11T02:17:19.1254275Z ">paginated_view</a> \U0001f512", | |
2021-07-11T02:17:19.1254636Z ] | |
2021-07-11T02:17:19.1255053Z anon_response = client.get("/fixtures") | |
2021-07-11T02:17:19.1255567Z for html_fragment in html_fragments: | |
2021-07-11T02:17:19.1256127Z assert html_fragment not in anon_response.text | |
2021-07-11T02:17:19.1256662Z auth_response = client.get( | |
2021-07-11T02:17:19.1257224Z "/fixtures", cookies={"ds_actor": client.actor_cookie({"id": "root"})} | |
2021-07-11T02:17:19.1257692Z ) | |
2021-07-11T02:17:19.1258080Z for html_fragment in html_fragments: | |
2021-07-11T02:17:19.1258620Z > assert html_fragment in auth_response.text | |
2021-07-11T02:17:19.1258958Z | |
2021-07-11T02:17:19.1259426Z D:\a\datasette\datasette\tests\test_permissions.py:180: | |
2021-07-11T02:17:19.1259936Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1260511Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1261129Z next(self.gen) | |
2021-07-11T02:17:19.1261655Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1262272Z yield TestClient(ds) | |
2021-07-11T02:17:19.1262859Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1263414Z self.cleanup() | |
2021-07-11T02:17:19.1263998Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1264614Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1265214Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1265821Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1266452Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1267114Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1267572Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1267811Z | |
2021-07-11T02:17:19.1268254Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp367p0zbl' | |
2021-07-11T02:17:19.1268893Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B8F7A488> | |
2021-07-11T02:17:19.1269262Z | |
2021-07-11T02:17:19.1269618Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1269999Z try: | |
2021-07-11T02:17:19.1270372Z if os.path.islink(path): | |
2021-07-11T02:17:19.1270951Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1271563Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1272049Z except OSError: | |
2021-07-11T02:17:19.1272534Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1273108Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1273532Z return | |
2021-07-11T02:17:19.1273838Z names = [] | |
2021-07-11T02:17:19.1274141Z try: | |
2021-07-11T02:17:19.1274488Z names = os.listdir(path) | |
2021-07-11T02:17:19.1274891Z except OSError: | |
2021-07-11T02:17:19.1275356Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1275799Z for name in names: | |
2021-07-11T02:17:19.1276241Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1277295Z try: | |
2021-07-11T02:17:19.1277687Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1278118Z except OSError: | |
2021-07-11T02:17:19.1278479Z mode = 0 | |
2021-07-11T02:17:19.1278825Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1279283Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1279682Z else: | |
2021-07-11T02:17:19.1279991Z try: | |
2021-07-11T02:17:19.1280351Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1281349Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp367p0zbl\\fixtures.db' | |
2021-07-11T02:17:19.1282105Z | |
2021-07-11T02:17:19.1282674Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1283353Z ________________________ test_view_query[None-200-200] ________________________ | |
2021-07-11T02:17:19.1283649Z | |
2021-07-11T02:17:19.1284065Z allow = None, expected_anon = 200, expected_auth = 200 | |
2021-07-11T02:17:19.1284393Z | |
2021-07-11T02:17:19.1284814Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1285388Z "allow,expected_anon,expected_auth", | |
2021-07-11T02:17:19.1285814Z [ | |
2021-07-11T02:17:19.1286104Z (None, 200, 200), | |
2021-07-11T02:17:19.1286418Z ({}, 403, 403), | |
2021-07-11T02:17:19.1286738Z ({"id": "root"}, 403, 200), | |
2021-07-11T02:17:19.1287032Z ], | |
2021-07-11T02:17:19.1287304Z ) | |
2021-07-11T02:17:19.1287760Z def test_view_query(allow, expected_anon, expected_auth): | |
2021-07-11T02:17:19.1288256Z with make_app_client( | |
2021-07-11T02:17:19.1288628Z metadata={ | |
2021-07-11T02:17:19.1288989Z "databases": { | |
2021-07-11T02:17:19.1289528Z "fixtures": {"queries": {"q": {"sql": "select 1 + 1", "allow": allow}}} | |
2021-07-11T02:17:19.1289964Z } | |
2021-07-11T02:17:19.1290236Z } | |
2021-07-11T02:17:19.1290589Z ) as client: | |
2021-07-11T02:17:19.1291037Z anon_response = client.get("/fixtures/q") | |
2021-07-11T02:17:19.1291609Z assert expected_anon == anon_response.status | |
2021-07-11T02:17:19.1292182Z if allow and anon_response.status == 200: | |
2021-07-11T02:17:19.1292647Z # Should be no padlock | |
2021-07-11T02:17:19.1293126Z assert "\U0001f512</h1>" not in anon_response.text | |
2021-07-11T02:17:19.1293635Z auth_response = client.get( | |
2021-07-11T02:17:19.1294207Z "/fixtures/q", cookies={"ds_actor": client.actor_cookie({"id": "root"})} | |
2021-07-11T02:17:19.1294665Z ) | |
2021-07-11T02:17:19.1295118Z assert expected_auth == auth_response.status | |
2021-07-11T02:17:19.1295715Z if allow and expected_anon == 403 and expected_auth == 200: | |
2021-07-11T02:17:19.1296300Z > assert ">fixtures: q \U0001f512</h1>" in auth_response.text | |
2021-07-11T02:17:19.1296660Z | |
2021-07-11T02:17:19.1297130Z D:\a\datasette\datasette\tests\test_permissions.py:209: | |
2021-07-11T02:17:19.1297637Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1298209Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1298775Z next(self.gen) | |
2021-07-11T02:17:19.1299299Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1299853Z yield TestClient(ds) | |
2021-07-11T02:17:19.1300434Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1301036Z self.cleanup() | |
2021-07-11T02:17:19.1301615Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1302239Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1302827Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1303483Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1304129Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1304780Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1305242Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1305478Z | |
2021-07-11T02:17:19.1305924Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpf4i83fc7' | |
2021-07-11T02:17:19.1306565Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B8F746A8> | |
2021-07-11T02:17:19.1306929Z | |
2021-07-11T02:17:19.1307298Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1307668Z try: | |
2021-07-11T02:17:19.1308044Z if os.path.islink(path): | |
2021-07-11T02:17:19.1308571Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1309181Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1309668Z except OSError: | |
2021-07-11T02:17:19.1310152Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1310770Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1311196Z return | |
2021-07-11T02:17:19.1311495Z names = [] | |
2021-07-11T02:17:19.1311796Z try: | |
2021-07-11T02:17:19.1312159Z names = os.listdir(path) | |
2021-07-11T02:17:19.1312547Z except OSError: | |
2021-07-11T02:17:19.1313010Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1313448Z for name in names: | |
2021-07-11T02:17:19.1313889Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1314296Z try: | |
2021-07-11T02:17:19.1314669Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1315099Z except OSError: | |
2021-07-11T02:17:19.1315512Z mode = 0 | |
2021-07-11T02:17:19.1315860Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1316319Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1316733Z else: | |
2021-07-11T02:17:19.1317031Z try: | |
2021-07-11T02:17:19.1317390Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1318336Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpf4i83fc7\\fixtures.db' | |
2021-07-11T02:17:19.1319088Z | |
2021-07-11T02:17:19.1319651Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1320327Z _______________________ test_view_query[allow1-403-403] _______________________ | |
2021-07-11T02:17:19.1320886Z | |
2021-07-11T02:17:19.1321284Z allow = {}, expected_anon = 403, expected_auth = 403 | |
2021-07-11T02:17:19.1321599Z | |
2021-07-11T02:17:19.1322024Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1322591Z "allow,expected_anon,expected_auth", | |
2021-07-11T02:17:19.1323016Z [ | |
2021-07-11T02:17:19.1323324Z (None, 200, 200), | |
2021-07-11T02:17:19.1323626Z ({}, 403, 403), | |
2021-07-11T02:17:19.1323954Z ({"id": "root"}, 403, 200), | |
2021-07-11T02:17:19.1324257Z ], | |
2021-07-11T02:17:19.1324512Z ) | |
2021-07-11T02:17:19.1324964Z def test_view_query(allow, expected_anon, expected_auth): | |
2021-07-11T02:17:19.1325463Z with make_app_client( | |
2021-07-11T02:17:19.1325838Z metadata={ | |
2021-07-11T02:17:19.1326198Z "databases": { | |
2021-07-11T02:17:19.1326667Z "fixtures": {"queries": {"q": {"sql": "select 1 + 1", "allow": allow}}} | |
2021-07-11T02:17:19.1327097Z } | |
2021-07-11T02:17:19.1327384Z } | |
2021-07-11T02:17:19.1327674Z ) as client: | |
2021-07-11T02:17:19.1328114Z anon_response = client.get("/fixtures/q") | |
2021-07-11T02:17:19.1328698Z assert expected_anon == anon_response.status | |
2021-07-11T02:17:19.1329251Z if allow and anon_response.status == 200: | |
2021-07-11T02:17:19.1329794Z # Should be no padlock | |
2021-07-11T02:17:19.1330276Z assert "\U0001f512</h1>" not in anon_response.text | |
2021-07-11T02:17:19.1332627Z auth_response = client.get( | |
2021-07-11T02:17:19.1333499Z "/fixtures/q", cookies={"ds_actor": client.actor_cookie({"id": "root"})} | |
2021-07-11T02:17:19.1333968Z ) | |
2021-07-11T02:17:19.1334424Z assert expected_auth == auth_response.status | |
2021-07-11T02:17:19.1335026Z if allow and expected_anon == 403 and expected_auth == 200: | |
2021-07-11T02:17:19.1335613Z > assert ">fixtures: q \U0001f512</h1>" in auth_response.text | |
2021-07-11T02:17:19.1335979Z | |
2021-07-11T02:17:19.1336452Z D:\a\datasette\datasette\tests\test_permissions.py:209: | |
2021-07-11T02:17:19.1336972Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1337545Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1338119Z next(self.gen) | |
2021-07-11T02:17:19.1338656Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1339197Z yield TestClient(ds) | |
2021-07-11T02:17:19.1339782Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1340337Z self.cleanup() | |
2021-07-11T02:17:19.1340982Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1341598Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1342187Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1342805Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1343443Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1344095Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1344684Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1344922Z | |
2021-07-11T02:17:19.1345389Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmplv774m3a' | |
2021-07-11T02:17:19.1346015Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B8BF7620> | |
2021-07-11T02:17:19.1346386Z | |
2021-07-11T02:17:19.1346758Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1347128Z try: | |
2021-07-11T02:17:19.1347509Z if os.path.islink(path): | |
2021-07-11T02:17:19.1348058Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1348650Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1349136Z except OSError: | |
2021-07-11T02:17:19.1349632Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1350190Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1350668Z return | |
2021-07-11T02:17:19.1350970Z names = [] | |
2021-07-11T02:17:19.1351270Z try: | |
2021-07-11T02:17:19.1351628Z names = os.listdir(path) | |
2021-07-11T02:17:19.1352028Z except OSError: | |
2021-07-11T02:17:19.1352520Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1352971Z for name in names: | |
2021-07-11T02:17:19.1353402Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1353802Z try: | |
2021-07-11T02:17:19.1354194Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1354609Z except OSError: | |
2021-07-11T02:17:19.1354964Z mode = 0 | |
2021-07-11T02:17:19.1355312Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1355769Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1356178Z else: | |
2021-07-11T02:17:19.1356473Z try: | |
2021-07-11T02:17:19.1356830Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1357848Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmplv774m3a\\fixtures.db' | |
2021-07-11T02:17:19.1358619Z | |
2021-07-11T02:17:19.1359166Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1359852Z _______________________ test_view_query[allow2-403-200] _______________________ | |
2021-07-11T02:17:19.1360163Z | |
2021-07-11T02:17:19.1360617Z allow = {'id': 'root'}, expected_anon = 403, expected_auth = 200 | |
2021-07-11T02:17:19.1360955Z | |
2021-07-11T02:17:19.1361380Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1361976Z "allow,expected_anon,expected_auth", | |
2021-07-11T02:17:19.1362391Z [ | |
2021-07-11T02:17:19.1362694Z (None, 200, 200), | |
2021-07-11T02:17:19.1362998Z ({}, 403, 403), | |
2021-07-11T02:17:19.1363409Z ({"id": "root"}, 403, 200), | |
2021-07-11T02:17:19.1363819Z ], | |
2021-07-11T02:17:19.1364147Z ) | |
2021-07-11T02:17:19.1364619Z def test_view_query(allow, expected_anon, expected_auth): | |
2021-07-11T02:17:19.1365207Z with make_app_client( | |
2021-07-11T02:17:19.1365639Z metadata={ | |
2021-07-11T02:17:19.1366031Z "databases": { | |
2021-07-11T02:17:19.1366575Z "fixtures": {"queries": {"q": {"sql": "select 1 + 1", "allow": allow}}} | |
2021-07-11T02:17:19.1367064Z } | |
2021-07-11T02:17:19.1367359Z } | |
2021-07-11T02:17:19.1367744Z ) as client: | |
2021-07-11T02:17:19.1368296Z anon_response = client.get("/fixtures/q") | |
2021-07-11T02:17:19.1368912Z assert expected_anon == anon_response.status | |
2021-07-11T02:17:19.1369557Z if allow and anon_response.status == 200: | |
2021-07-11T02:17:19.1370091Z # Should be no padlock | |
2021-07-11T02:17:19.1393431Z assert "\U0001f512</h1>" not in anon_response.text | |
2021-07-11T02:17:19.1394247Z auth_response = client.get( | |
2021-07-11T02:17:19.1394826Z "/fixtures/q", cookies={"ds_actor": client.actor_cookie({"id": "root"})} | |
2021-07-11T02:17:19.1395309Z ) | |
2021-07-11T02:17:19.1395768Z assert expected_auth == auth_response.status | |
2021-07-11T02:17:19.1396352Z if allow and expected_anon == 403 and expected_auth == 200: | |
2021-07-11T02:17:19.1396960Z > assert ">fixtures: q \U0001f512</h1>" in auth_response.text | |
2021-07-11T02:17:19.1397327Z | |
2021-07-11T02:17:19.1397801Z D:\a\datasette\datasette\tests\test_permissions.py:209: | |
2021-07-11T02:17:19.1398315Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1398895Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1399464Z next(self.gen) | |
2021-07-11T02:17:19.1399989Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1400635Z yield TestClient(ds) | |
2021-07-11T02:17:19.1401227Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1401781Z self.cleanup() | |
2021-07-11T02:17:19.1402364Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1402968Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1403565Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1404178Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1404811Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1405469Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1405933Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1406170Z | |
2021-07-11T02:17:19.1406625Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpweqt7wy8' | |
2021-07-11T02:17:19.1407270Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B8B40D90> | |
2021-07-11T02:17:19.1407640Z | |
2021-07-11T02:17:19.1407997Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1408378Z try: | |
2021-07-11T02:17:19.1408826Z if os.path.islink(path): | |
2021-07-11T02:17:19.1409359Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1409971Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1410457Z except OSError: | |
2021-07-11T02:17:19.1410988Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1411561Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1411989Z return | |
2021-07-11T02:17:19.1412290Z names = [] | |
2021-07-11T02:17:19.1412588Z try: | |
2021-07-11T02:17:19.1412934Z names = os.listdir(path) | |
2021-07-11T02:17:19.1413341Z except OSError: | |
2021-07-11T02:17:19.1413807Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1414244Z for name in names: | |
2021-07-11T02:17:19.1414691Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1415093Z try: | |
2021-07-11T02:17:19.1415474Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1415904Z except OSError: | |
2021-07-11T02:17:19.1416260Z mode = 0 | |
2021-07-11T02:17:19.1416607Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1417066Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1417463Z else: | |
2021-07-11T02:17:19.1417770Z try: | |
2021-07-11T02:17:19.1418129Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1419072Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpweqt7wy8\\fixtures.db' | |
2021-07-11T02:17:19.1419842Z | |
2021-07-11T02:17:19.1420400Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1421188Z _________________________ test_execute_sql[metadata0] _________________________ | |
2021-07-11T02:17:19.1421486Z | |
2021-07-11T02:17:19.1421834Z metadata = {'allow_sql': {'id': 'root'}} | |
2021-07-11T02:17:19.1422102Z | |
2021-07-11T02:17:19.1422523Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1422966Z "metadata", | |
2021-07-11T02:17:19.1423281Z [ | |
2021-07-11T02:17:19.1423602Z {"allow_sql": {"id": "root"}}, | |
2021-07-11T02:17:19.1424072Z {"databases": {"fixtures": {"allow_sql": {"id": "root"}}}}, | |
2021-07-11T02:17:19.1424476Z ], | |
2021-07-11T02:17:19.1424730Z ) | |
2021-07-11T02:17:19.1425097Z def test_execute_sql(metadata): | |
2021-07-11T02:17:19.1425629Z with make_app_client(metadata=metadata) as client: | |
2021-07-11T02:17:19.1426198Z form_fragment = '<form class="sql" action="/fixtures"' | |
2021-07-11T02:17:19.1426613Z | |
2021-07-11T02:17:19.1427033Z # Anonymous users - should not display the form: | |
2021-07-11T02:17:19.1427615Z assert form_fragment not in client.get("/fixtures").text | |
2021-07-11T02:17:19.1428103Z # This should 403: | |
2021-07-11T02:17:19.1428597Z assert 403 == client.get("/fixtures?sql=select+1").status | |
2021-07-11T02:17:19.1429125Z # ?_where= not allowed on tables: | |
2021-07-11T02:17:19.1429694Z assert 403 == client.get("/fixtures/facet_cities?_where=id=3").status | |
2021-07-11T02:17:19.1430141Z | |
2021-07-11T02:17:19.1430597Z # But for logged in user all of these should work: | |
2021-07-11T02:17:19.1431163Z cookies = {"ds_actor": client.actor_cookie({"id": "root"})} | |
2021-07-11T02:17:19.1431784Z response_text = client.get("/fixtures", cookies=cookies).text | |
2021-07-11T02:17:19.1432381Z assert form_fragment in response_text | |
2021-07-11T02:17:19.1433003Z assert 200 == client.get("/fixtures?sql=select+1", cookies=cookies).status | |
2021-07-11T02:17:19.1433509Z > assert ( | |
2021-07-11T02:17:19.1433818Z 200 | |
2021-07-11T02:17:19.1434338Z == client.get("/fixtures/facet_cities?_where=id=3", cookies=cookies).status | |
2021-07-11T02:17:19.1434880Z ) | |
2021-07-11T02:17:19.1435078Z | |
2021-07-11T02:17:19.1435554Z D:\a\datasette\datasette\tests\test_permissions.py:235: | |
2021-07-11T02:17:19.1436067Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1436646Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1437211Z next(self.gen) | |
2021-07-11T02:17:19.1437745Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1438290Z yield TestClient(ds) | |
2021-07-11T02:17:19.1438877Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1439427Z self.cleanup() | |
2021-07-11T02:17:19.1440010Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1440844Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1441446Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1442060Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1442702Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1443351Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1443810Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1444045Z | |
2021-07-11T02:17:19.1444511Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp9qts5ow7' | |
2021-07-11T02:17:19.1445143Z onerror = <function rmtree.<locals>.onerror at 0x000001D1B8F871E0> | |
2021-07-11T02:17:19.1445513Z | |
2021-07-11T02:17:19.1445893Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1446264Z try: | |
2021-07-11T02:17:19.1446638Z if os.path.islink(path): | |
2021-07-11T02:17:19.1447180Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1448444Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1448931Z except OSError: | |
2021-07-11T02:17:19.1449424Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1449979Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1450403Z return | |
2021-07-11T02:17:19.1450769Z names = [] | |
2021-07-11T02:17:19.1451071Z try: | |
2021-07-11T02:17:19.1451431Z names = os.listdir(path) | |
2021-07-11T02:17:19.1451822Z except OSError: | |
2021-07-11T02:17:19.1452310Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1452763Z for name in names: | |
2021-07-11T02:17:19.1453194Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1453594Z try: | |
2021-07-11T02:17:19.1453983Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1454404Z except OSError: | |
2021-07-11T02:17:19.1454757Z mode = 0 | |
2021-07-11T02:17:19.1455104Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1455562Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1455972Z else: | |
2021-07-11T02:17:19.1456267Z try: | |
2021-07-11T02:17:19.1456621Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1457569Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp9qts5ow7\\fixtures.db' | |
2021-07-11T02:17:19.1458333Z | |
2021-07-11T02:17:19.1458881Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1459565Z _________________________ test_execute_sql[metadata1] _________________________ | |
2021-07-11T02:17:19.1459875Z | |
2021-07-11T02:17:19.1460415Z metadata = {'databases': {'fixtures': {'about': None, 'about_url': None, 'allow_sql': {'id': 'root'}, 'license': None, ...}}} | |
2021-07-11T02:17:19.1460928Z | |
2021-07-11T02:17:19.1461355Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1461817Z "metadata", | |
2021-07-11T02:17:19.1462186Z [ | |
2021-07-11T02:17:19.1462521Z {"allow_sql": {"id": "root"}}, | |
2021-07-11T02:17:19.1462973Z {"databases": {"fixtures": {"allow_sql": {"id": "root"}}}}, | |
2021-07-11T02:17:19.1463375Z ], | |
2021-07-11T02:17:19.1463646Z ) | |
2021-07-11T02:17:19.1463995Z def test_execute_sql(metadata): | |
2021-07-11T02:17:19.1464527Z with make_app_client(metadata=metadata) as client: | |
2021-07-11T02:17:19.1465103Z form_fragment = '<form class="sql" action="/fixtures"' | |
2021-07-11T02:17:19.1465503Z | |
2021-07-11T02:17:19.1465919Z # Anonymous users - should not display the form: | |
2021-07-11T02:17:19.1466513Z assert form_fragment not in client.get("/fixtures").text | |
2021-07-11T02:17:19.1466991Z # This should 403: | |
2021-07-11T02:17:19.1467486Z assert 403 == client.get("/fixtures?sql=select+1").status | |
2021-07-11T02:17:19.1468023Z # ?_where= not allowed on tables: | |
2021-07-11T02:17:19.1468578Z assert 403 == client.get("/fixtures/facet_cities?_where=id=3").status | |
2021-07-11T02:17:19.1469042Z | |
2021-07-11T02:17:19.1469435Z # But for logged in user all of these should work: | |
2021-07-11T02:17:19.1470000Z cookies = {"ds_actor": client.actor_cookie({"id": "root"})} | |
2021-07-11T02:17:19.1470676Z response_text = client.get("/fixtures", cookies=cookies).text | |
2021-07-11T02:17:19.1471259Z assert form_fragment in response_text | |
2021-07-11T02:17:19.1471887Z assert 200 == client.get("/fixtures?sql=select+1", cookies=cookies).status | |
2021-07-11T02:17:19.1472403Z > assert ( | |
2021-07-11T02:17:19.1472700Z 200 | |
2021-07-11T02:17:19.1473216Z == client.get("/fixtures/facet_cities?_where=id=3", cookies=cookies).status | |
2021-07-11T02:17:19.1473781Z ) | |
2021-07-11T02:17:19.1473975Z | |
2021-07-11T02:17:19.1474436Z D:\a\datasette\datasette\tests\test_permissions.py:235: | |
2021-07-11T02:17:19.1474955Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1475534Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1476087Z next(self.gen) | |
2021-07-11T02:17:19.1476624Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1477167Z yield TestClient(ds) | |
2021-07-11T02:17:19.1477753Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1478318Z self.cleanup() | |
2021-07-11T02:17:19.1478887Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1479502Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1480103Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1480748Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1481387Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1482057Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1482498Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1482733Z | |
2021-07-11T02:17:19.1483191Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp65snsytn' | |
2021-07-11T02:17:19.1483830Z onerror = <function rmtree.<locals>.onerror at 0x000001D1BA2BBBF8> | |
2021-07-11T02:17:19.1484206Z | |
2021-07-11T02:17:19.1484577Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1484960Z try: | |
2021-07-11T02:17:19.1485321Z if os.path.islink(path): | |
2021-07-11T02:17:19.1485858Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1486462Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1486930Z except OSError: | |
2021-07-11T02:17:19.1487422Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1487981Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1488462Z return | |
2021-07-11T02:17:19.1488782Z names = [] | |
2021-07-11T02:17:19.1489069Z try: | |
2021-07-11T02:17:19.1489432Z names = os.listdir(path) | |
2021-07-11T02:17:19.1489837Z except OSError: | |
2021-07-11T02:17:19.1490290Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1490790Z for name in names: | |
2021-07-11T02:17:19.1491235Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1491623Z try: | |
2021-07-11T02:17:19.1492015Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1492432Z except OSError: | |
2021-07-11T02:17:19.1492787Z mode = 0 | |
2021-07-11T02:17:19.1493148Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1493597Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1494011Z else: | |
2021-07-11T02:17:19.1494322Z try: | |
2021-07-11T02:17:19.1494675Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1495621Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp65snsytn\\fixtures.db' | |
2021-07-11T02:17:19.1496391Z | |
2021-07-11T02:17:19.1496960Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1497633Z _____________________ test_query_list_respects_view_query _____________________ | |
2021-07-11T02:17:19.1497954Z | |
2021-07-11T02:17:19.1498345Z def test_query_list_respects_view_query(): | |
2021-07-11T02:17:19.1498784Z with make_app_client( | |
2021-07-11T02:17:19.1499157Z metadata={ | |
2021-07-11T02:17:19.1499517Z "databases": { | |
2021-07-11T02:17:19.1499872Z "fixtures": { | |
2021-07-11T02:17:19.1500389Z "queries": {"q": {"sql": "select 1 + 1", "allow": {"id": "root"}}} | |
2021-07-11T02:17:19.1501160Z } | |
2021-07-11T02:17:19.1501444Z } | |
2021-07-11T02:17:19.1501726Z } | |
2021-07-11T02:17:19.1502017Z ) as client: | |
2021-07-11T02:17:19.1502520Z html_fragment = '<li><a href="/fixtures/q" title="select 1 + 1">q</a> \U0001f512</li>' | |
2021-07-11T02:17:19.1503117Z anon_response = client.get("/fixtures") | |
2021-07-11T02:17:19.1503679Z assert html_fragment not in anon_response.text | |
2021-07-11T02:17:19.1504263Z assert '"/fixtures/q"' not in anon_response.text | |
2021-07-11T02:17:19.1504791Z auth_response = client.get( | |
2021-07-11T02:17:19.1505347Z "/fixtures", cookies={"ds_actor": client.actor_cookie({"id": "root"})} | |
2021-07-11T02:17:19.1505807Z ) | |
2021-07-11T02:17:19.1506235Z > assert html_fragment in auth_response.text | |
2021-07-11T02:17:19.1506560Z | |
2021-07-11T02:17:19.1507028Z D:\a\datasette\datasette\tests\test_permissions.py:258: | |
2021-07-11T02:17:19.1507554Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1508115Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1508682Z next(self.gen) | |
2021-07-11T02:17:19.1509223Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1509761Z yield TestClient(ds) | |
2021-07-11T02:17:19.1510351Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1511101Z self.cleanup() | |
2021-07-11T02:17:19.1511674Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1512292Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1512892Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1513491Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1514135Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1514883Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1515334Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1515570Z | |
2021-07-11T02:17:19.1516036Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpbiklyd1u' | |
2021-07-11T02:17:19.1516677Z onerror = <function rmtree.<locals>.onerror at 0x000001D1BA0F0BF8> | |
2021-07-11T02:17:19.1517047Z | |
2021-07-11T02:17:19.1517428Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1517807Z try: | |
2021-07-11T02:17:19.1518167Z if os.path.islink(path): | |
2021-07-11T02:17:19.1518704Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1519293Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1519787Z except OSError: | |
2021-07-11T02:17:19.1520284Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1520899Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1521321Z return | |
2021-07-11T02:17:19.1521638Z names = [] | |
2021-07-11T02:17:19.1521924Z try: | |
2021-07-11T02:17:19.1522283Z names = os.listdir(path) | |
2021-07-11T02:17:19.1522688Z except OSError: | |
2021-07-11T02:17:19.1523142Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1523590Z for name in names: | |
2021-07-11T02:17:19.1524023Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1524425Z try: | |
2021-07-11T02:17:19.1524818Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1525235Z except OSError: | |
2021-07-11T02:17:19.1525589Z mode = 0 | |
2021-07-11T02:17:19.1525948Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1526394Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1526867Z else: | |
2021-07-11T02:17:19.1527179Z try: | |
2021-07-11T02:17:19.1527545Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1528480Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpbiklyd1u\\fixtures.db' | |
2021-07-11T02:17:19.1529243Z | |
2021-07-11T02:17:19.1529803Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1530529Z ___________________ test_allow_unauthenticated[allow0-403] ____________________ | |
2021-07-11T02:17:19.1530919Z | |
2021-07-11T02:17:19.1531262Z allow = {'id': 'root'}, expected = 403 | |
2021-07-11T02:17:19.1531530Z | |
2021-07-11T02:17:19.1531946Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1532439Z "allow,expected", | |
2021-07-11T02:17:19.1532788Z [ | |
2021-07-11T02:17:19.1533079Z ({"id": "root"}, 403), | |
2021-07-11T02:17:19.1533519Z ({"id": "root", "unauthenticated": True}, 200), | |
2021-07-11T02:17:19.1533918Z ], | |
2021-07-11T02:17:19.1534173Z ) | |
2021-07-11T02:17:19.1534629Z def test_allow_unauthenticated(allow, expected): | |
2021-07-11T02:17:19.1535242Z with make_app_client(metadata={"allow": allow}) as client: | |
2021-07-11T02:17:19.1535793Z > assert expected == client.get("/").status | |
2021-07-11T02:17:19.1536112Z | |
2021-07-11T02:17:19.1536581Z D:\a\datasette\datasette\tests\test_permissions.py:363: | |
2021-07-11T02:17:19.1537084Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1537660Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1538230Z next(self.gen) | |
2021-07-11T02:17:19.1538756Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1539312Z yield TestClient(ds) | |
2021-07-11T02:17:19.1539898Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1540452Z self.cleanup() | |
2021-07-11T02:17:19.1541088Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1541770Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1542360Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1542970Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1543608Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1544256Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1544714Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1544949Z | |
2021-07-11T02:17:19.1545377Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmps8_eq_gi' | |
2021-07-11T02:17:19.1546003Z onerror = <function rmtree.<locals>.onerror at 0x000001D1BA264E18> | |
2021-07-11T02:17:19.1546370Z | |
2021-07-11T02:17:19.1546737Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1547109Z try: | |
2021-07-11T02:17:19.1547485Z if os.path.islink(path): | |
2021-07-11T02:17:19.1548019Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1548620Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1549102Z except OSError: | |
2021-07-11T02:17:19.1549584Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1550157Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1550769Z return | |
2021-07-11T02:17:19.1551086Z names = [] | |
2021-07-11T02:17:19.1551385Z try: | |
2021-07-11T02:17:19.1551745Z names = os.listdir(path) | |
2021-07-11T02:17:19.1552136Z except OSError: | |
2021-07-11T02:17:19.1552629Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1553068Z for name in names: | |
2021-07-11T02:17:19.1553512Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1554009Z try: | |
2021-07-11T02:17:19.1554385Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1554816Z except OSError: | |
2021-07-11T02:17:19.1555175Z mode = 0 | |
2021-07-11T02:17:19.1555522Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1555977Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1556386Z else: | |
2021-07-11T02:17:19.1556684Z try: | |
2021-07-11T02:17:19.1557039Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1557967Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmps8_eq_gi\\fixtures.db' | |
2021-07-11T02:17:19.1558706Z | |
2021-07-11T02:17:19.1559257Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1559978Z ___________________ test_allow_unauthenticated[allow1-200] ____________________ | |
2021-07-11T02:17:19.1560338Z | |
2021-07-11T02:17:19.1560842Z allow = {'id': 'root', 'unauthenticated': True}, expected = 200 | |
2021-07-11T02:17:19.1561205Z | |
2021-07-11T02:17:19.1561626Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1562119Z "allow,expected", | |
2021-07-11T02:17:19.1562466Z [ | |
2021-07-11T02:17:19.1562768Z ({"id": "root"}, 403), | |
2021-07-11T02:17:19.1563188Z ({"id": "root", "unauthenticated": True}, 200), | |
2021-07-11T02:17:19.1563583Z ], | |
2021-07-11T02:17:19.1563851Z ) | |
2021-07-11T02:17:19.1564292Z def test_allow_unauthenticated(allow, expected): | |
2021-07-11T02:17:19.1564904Z with make_app_client(metadata={"allow": allow}) as client: | |
2021-07-11T02:17:19.1565455Z > assert expected == client.get("/").status | |
2021-07-11T02:17:19.1565776Z | |
2021-07-11T02:17:19.1566253Z D:\a\datasette\datasette\tests\test_permissions.py:363: | |
2021-07-11T02:17:19.1566772Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1567336Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1567898Z next(self.gen) | |
2021-07-11T02:17:19.1568509Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1569061Z yield TestClient(ds) | |
2021-07-11T02:17:19.1569645Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1570204Z self.cleanup() | |
2021-07-11T02:17:19.1570812Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1571434Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1572018Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1572626Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1573256Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1573913Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1574374Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1574612Z | |
2021-07-11T02:17:19.1575080Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp8ehpha8y' | |
2021-07-11T02:17:19.1575718Z onerror = <function rmtree.<locals>.onerror at 0x000001D1BA2B1D08> | |
2021-07-11T02:17:19.1576095Z | |
2021-07-11T02:17:19.1576468Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1576838Z try: | |
2021-07-11T02:17:19.1577215Z if os.path.islink(path): | |
2021-07-11T02:17:19.1577754Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1578345Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1578832Z except OSError: | |
2021-07-11T02:17:19.1579328Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1579889Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1580308Z return | |
2021-07-11T02:17:19.1580749Z names = [] | |
2021-07-11T02:17:19.1581034Z try: | |
2021-07-11T02:17:19.1581393Z names = os.listdir(path) | |
2021-07-11T02:17:19.1581788Z except OSError: | |
2021-07-11T02:17:19.1582254Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1582704Z for name in names: | |
2021-07-11T02:17:19.1583133Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1583538Z try: | |
2021-07-11T02:17:19.1583930Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1584342Z except OSError: | |
2021-07-11T02:17:19.1584692Z mode = 0 | |
2021-07-11T02:17:19.1585051Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1585502Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1585912Z else: | |
2021-07-11T02:17:19.1586208Z try: | |
2021-07-11T02:17:19.1586567Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1587520Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp8ehpha8y\\fixtures.db' | |
2021-07-11T02:17:19.1588297Z | |
2021-07-11T02:17:19.1588846Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1589518Z ________________________ test_hook_extra_template_vars ________________________ | |
2021-07-11T02:17:19.1589825Z | |
2021-07-11T02:17:19.1590175Z restore_working_directory = None | |
2021-07-11T02:17:19.1590473Z | |
2021-07-11T02:17:19.1590987Z def test_hook_extra_template_vars(restore_working_directory): | |
2021-07-11T02:17:19.1591515Z with make_app_client( | |
2021-07-11T02:17:19.1592065Z template_dir=str(pathlib.Path(__file__).parent / "test_templates") | |
2021-07-11T02:17:19.1592580Z ) as client: | |
2021-07-11T02:17:19.1593010Z response = client.get("/-/metadata") | |
2021-07-11T02:17:19.1593511Z assert response.status == 200 | |
2021-07-11T02:17:19.1594018Z extra_template_vars = json.loads( | |
2021-07-11T02:17:19.1594725Z Soup(response.body, "html.parser").select("pre.extra_template_vars")[0].text | |
2021-07-11T02:17:19.1595277Z ) | |
2021-07-11T02:17:19.1595577Z assert { | |
2021-07-11T02:17:19.1595956Z "template": "show_json.html", | |
2021-07-11T02:17:19.1596400Z "scope_path": "/-/metadata", | |
2021-07-11T02:17:19.1596803Z "columns": None, | |
2021-07-11T02:17:19.1597186Z } == extra_template_vars | |
2021-07-11T02:17:19.1597696Z extra_template_vars_from_awaitable = json.loads( | |
2021-07-11T02:17:19.1598280Z Soup(response.body, "html.parser") | |
2021-07-11T02:17:19.1598861Z .select("pre.extra_template_vars_from_awaitable")[0] | |
2021-07-11T02:17:19.1599319Z .text | |
2021-07-11T02:17:19.1599611Z ) | |
2021-07-11T02:17:19.1599892Z > assert { | |
2021-07-11T02:17:19.1600293Z "template": "show_json.html", | |
2021-07-11T02:17:19.1600756Z "awaitable": True, | |
2021-07-11T02:17:19.1601178Z "scope_path": "/-/metadata", | |
2021-07-11T02:17:19.1601655Z } == extra_template_vars_from_awaitable | |
2021-07-11T02:17:19.1601965Z | |
2021-07-11T02:17:19.1602388Z D:\a\datasette\datasette\tests\test_plugins.py:322: | |
2021-07-11T02:17:19.1602874Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1603448Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1604001Z next(self.gen) | |
2021-07-11T02:17:19.1604535Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1605077Z yield TestClient(ds) | |
2021-07-11T02:17:19.1605665Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1606230Z self.cleanup() | |
2021-07-11T02:17:19.1606794Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1607474Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1608076Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1608667Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1609303Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1609972Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1610420Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1610704Z | |
2021-07-11T02:17:19.1611165Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpslrk88mc' | |
2021-07-11T02:17:19.1611809Z onerror = <function rmtree.<locals>.onerror at 0x000001D1BB5B8F28> | |
2021-07-11T02:17:19.1612170Z | |
2021-07-11T02:17:19.1612536Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1612914Z try: | |
2021-07-11T02:17:19.1613275Z if os.path.islink(path): | |
2021-07-11T02:17:19.1613822Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1614425Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1614897Z except OSError: | |
2021-07-11T02:17:19.1615396Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1615968Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1616384Z return | |
2021-07-11T02:17:19.1616694Z names = [] | |
2021-07-11T02:17:19.1616977Z try: | |
2021-07-11T02:17:19.1617333Z names = os.listdir(path) | |
2021-07-11T02:17:19.1617737Z except OSError: | |
2021-07-11T02:17:19.1618183Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1618631Z for name in names: | |
2021-07-11T02:17:19.1619070Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1619458Z try: | |
2021-07-11T02:17:19.1619845Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1620275Z except OSError: | |
2021-07-11T02:17:19.1620658Z mode = 0 | |
2021-07-11T02:17:19.1621021Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1621518Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1621929Z else: | |
2021-07-11T02:17:19.1622236Z try: | |
2021-07-11T02:17:19.1622581Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1623530Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpslrk88mc\\fixtures.db' | |
2021-07-11T02:17:19.1624302Z | |
2021-07-11T02:17:19.1624861Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1625543Z ____________________ test_plugins_async_template_function _____________________ | |
2021-07-11T02:17:19.1625872Z | |
2021-07-11T02:17:19.1626233Z restore_working_directory = None | |
2021-07-11T02:17:19.1626523Z | |
2021-07-11T02:17:19.1627005Z def test_plugins_async_template_function(restore_working_directory): | |
2021-07-11T02:17:19.1627557Z with make_app_client( | |
2021-07-11T02:17:19.1628105Z template_dir=str(pathlib.Path(__file__).parent / "test_templates") | |
2021-07-11T02:17:19.1628621Z ) as client: | |
2021-07-11T02:17:19.1629055Z response = client.get("/-/metadata") | |
2021-07-11T02:17:19.1629550Z assert response.status == 200 | |
2021-07-11T02:17:19.1630038Z extra_from_awaitable_function = ( | |
2021-07-11T02:17:19.1630609Z Soup(response.body, "html.parser") | |
2021-07-11T02:17:19.1631181Z .select("pre.extra_from_awaitable_function")[0] | |
2021-07-11T02:17:19.1631624Z .text | |
2021-07-11T02:17:19.1631918Z ) | |
2021-07-11T02:17:19.1632226Z expected = ( | |
2021-07-11T02:17:19.1632800Z sqlite3.connect(":memory:").execute("select sqlite_version()").fetchone()[0] | |
2021-07-11T02:17:19.1633389Z ) | |
2021-07-11T02:17:19.1633822Z > assert expected == extra_from_awaitable_function | |
2021-07-11T02:17:19.1634174Z | |
2021-07-11T02:17:19.1634617Z D:\a\datasette\datasette\tests\test_plugins.py:343: | |
2021-07-11T02:17:19.1635096Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1635669Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1636227Z next(self.gen) | |
2021-07-11T02:17:19.1636751Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1637302Z yield TestClient(ds) | |
2021-07-11T02:17:19.1637882Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1638430Z self.cleanup() | |
2021-07-11T02:17:19.1639002Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1639621Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1640206Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1640866Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1641505Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1642152Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1642608Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1642846Z | |
2021-07-11T02:17:19.1643293Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp1vupf4ey' | |
2021-07-11T02:17:19.1643942Z onerror = <function rmtree.<locals>.onerror at 0x000001D1BB7DA9D8> | |
2021-07-11T02:17:19.1644315Z | |
2021-07-11T02:17:19.1644671Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1645049Z try: | |
2021-07-11T02:17:19.1645422Z if os.path.islink(path): | |
2021-07-11T02:17:19.1645950Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1646562Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1647050Z except OSError: | |
2021-07-11T02:17:19.1647533Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1648168Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1648597Z return | |
2021-07-11T02:17:19.1648896Z names = [] | |
2021-07-11T02:17:19.1649195Z try: | |
2021-07-11T02:17:19.1649551Z names = os.listdir(path) | |
2021-07-11T02:17:19.1649941Z except OSError: | |
2021-07-11T02:17:19.1650406Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1650890Z for name in names: | |
2021-07-11T02:17:19.1651334Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1651736Z try: | |
2021-07-11T02:17:19.1652110Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1652563Z except OSError: | |
2021-07-11T02:17:19.1652917Z mode = 0 | |
2021-07-11T02:17:19.1653272Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1653731Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1654142Z else: | |
2021-07-11T02:17:19.1654441Z try: | |
2021-07-11T02:17:19.1654800Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1655734Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp1vupf4ey\\fixtures.db' | |
2021-07-11T02:17:19.1656501Z | |
2021-07-11T02:17:19.1657053Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1657748Z _____________________ test_hook_register_routes_csrftoken _____________________ | |
2021-07-11T02:17:19.1658080Z | |
2021-07-11T02:17:19.1658427Z restore_working_directory = None | |
2021-07-11T02:17:19.1659767Z tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x000001D1AB908978>, _basetemp=WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0'))) | |
2021-07-11T02:17:19.1662120Z | |
2021-07-11T02:17:19.1662675Z def test_hook_register_routes_csrftoken(restore_working_directory, tmpdir_factory): | |
2021-07-11T02:17:19.1663403Z templates = tmpdir_factory.mktemp("templates") | |
2021-07-11T02:17:19.1664010Z (templates / "csrftoken_form.html").write_text( | |
2021-07-11T02:17:19.1664531Z "CSRFTOKEN: {{ csrftoken() }}", "utf-8" | |
2021-07-11T02:17:19.1664906Z ) | |
2021-07-11T02:17:19.1665362Z with make_app_client(template_dir=templates) as client: | |
2021-07-11T02:17:19.1665958Z response = client.get("/csrftoken-form/") | |
2021-07-11T02:17:19.1666623Z expected_token = client.ds._last_request.scope["csrftoken"]() | |
2021-07-11T02:17:19.1667313Z > assert f"CSRFTOKEN: {expected_token}" == response.text | |
2021-07-11T02:17:19.1667692Z | |
2021-07-11T02:17:19.1668116Z D:\a\datasette\datasette\tests\test_plugins.py:666: | |
2021-07-11T02:17:19.1668606Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1669179Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1669723Z next(self.gen) | |
2021-07-11T02:17:19.1670261Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1670862Z yield TestClient(ds) | |
2021-07-11T02:17:19.1671460Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1672022Z self.cleanup() | |
2021-07-11T02:17:19.1672590Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1673209Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1673806Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1674401Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1675038Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1675712Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1676253Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1676492Z | |
2021-07-11T02:17:19.1676928Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp_d6702ly' | |
2021-07-11T02:17:19.1677542Z onerror = <function rmtree.<locals>.onerror at 0x000001D1BA3B5510> | |
2021-07-11T02:17:19.1677911Z | |
2021-07-11T02:17:19.1678282Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1678666Z try: | |
2021-07-11T02:17:19.1679028Z if os.path.islink(path): | |
2021-07-11T02:17:19.1679571Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1680180Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1680693Z except OSError: | |
2021-07-11T02:17:19.1681193Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1681764Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1682174Z return | |
2021-07-11T02:17:19.1682487Z names = [] | |
2021-07-11T02:17:19.1682779Z try: | |
2021-07-11T02:17:19.1683136Z names = os.listdir(path) | |
2021-07-11T02:17:19.1683539Z except OSError: | |
2021-07-11T02:17:19.1683989Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1684439Z for name in names: | |
2021-07-11T02:17:19.1684886Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1685273Z try: | |
2021-07-11T02:17:19.1685662Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1686080Z except OSError: | |
2021-07-11T02:17:19.1686433Z mode = 0 | |
2021-07-11T02:17:19.1686798Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1687241Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1687648Z else: | |
2021-07-11T02:17:19.1687951Z try: | |
2021-07-11T02:17:19.1688368Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1689302Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp_d6702ly\\fixtures.db' | |
2021-07-11T02:17:19.1690044Z | |
2021-07-11T02:17:19.1690647Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1691348Z __________________ test_hook_register_routes_render_message ___________________ | |
2021-07-11T02:17:19.1691688Z | |
2021-07-11T02:17:19.1692048Z restore_working_directory = None | |
2021-07-11T02:17:19.1693370Z tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x000001D1AB908978>, _basetemp=WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0'))) | |
2021-07-11T02:17:19.1694495Z | |
2021-07-11T02:17:19.1695056Z def test_hook_register_routes_render_message(restore_working_directory, tmpdir_factory): | |
2021-07-11T02:17:19.1695803Z templates = tmpdir_factory.mktemp("templates") | |
2021-07-11T02:17:19.1696493Z (templates / "render_message.html").write_text('{% extends "base.html" %}', "utf-8") | |
2021-07-11T02:17:19.1697194Z with make_app_client(template_dir=templates) as client: | |
2021-07-11T02:17:19.1697787Z response1 = client.get("/add-message/") | |
2021-07-11T02:17:19.1698495Z response2 = client.get("/render-message/", cookies=response1.cookies) | |
2021-07-11T02:17:19.1699184Z assert 200 == response2.status | |
2021-07-11T02:17:19.1699732Z > assert "Hello from messages" in response2.text | |
2021-07-11T02:17:19.1700069Z | |
2021-07-11T02:17:19.1700515Z D:\a\datasette\datasette\tests\test_plugins.py:690: | |
2021-07-11T02:17:19.1701057Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1701621Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1702185Z next(self.gen) | |
2021-07-11T02:17:19.1702717Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1703312Z yield TestClient(ds) | |
2021-07-11T02:17:19.1703894Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1704458Z self.cleanup() | |
2021-07-11T02:17:19.1705026Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1705644Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1706239Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1706836Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1707474Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1708145Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1708594Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1708834Z | |
2021-07-11T02:17:19.1709277Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp0sv_cq4z' | |
2021-07-11T02:17:19.1709896Z onerror = <function rmtree.<locals>.onerror at 0x000001D1BA1E5F28> | |
2021-07-11T02:17:19.1710262Z | |
2021-07-11T02:17:19.1710811Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1711213Z try: | |
2021-07-11T02:17:19.1711578Z if os.path.islink(path): | |
2021-07-11T02:17:19.1712115Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1712708Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1713197Z except OSError: | |
2021-07-11T02:17:19.1713692Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1714251Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1714674Z return | |
2021-07-11T02:17:19.1714985Z names = [] | |
2021-07-11T02:17:19.1715273Z try: | |
2021-07-11T02:17:19.1715717Z names = os.listdir(path) | |
2021-07-11T02:17:19.1716123Z except OSError: | |
2021-07-11T02:17:19.1716581Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1717037Z for name in names: | |
2021-07-11T02:17:19.1717472Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1717873Z try: | |
2021-07-11T02:17:19.1718270Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1718689Z except OSError: | |
2021-07-11T02:17:19.1719047Z mode = 0 | |
2021-07-11T02:17:19.1719414Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1719858Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1720270Z else: | |
2021-07-11T02:17:19.1720624Z try: | |
2021-07-11T02:17:19.1720973Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1721908Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp0sv_cq4z\\fixtures.db' | |
2021-07-11T02:17:19.1722657Z | |
2021-07-11T02:17:19.1723198Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1723898Z _____________________ test_hook_register_magic_parameters _____________________ | |
2021-07-11T02:17:19.1724232Z | |
2021-07-11T02:17:19.1724590Z restore_working_directory = None | |
2021-07-11T02:17:19.1724867Z | |
2021-07-11T02:17:19.1725363Z def test_hook_register_magic_parameters(restore_working_directory): | |
2021-07-11T02:17:19.1725917Z with make_app_client( | |
2021-07-11T02:17:19.1726422Z extra_databases={"data.db": "create table logs (line text)"}, | |
2021-07-11T02:17:19.1726897Z metadata={ | |
2021-07-11T02:17:19.1727259Z "databases": { | |
2021-07-11T02:17:19.1727597Z "data": { | |
2021-07-11T02:17:19.1727942Z "queries": { | |
2021-07-11T02:17:19.1728302Z "runme": { | |
2021-07-11T02:17:19.1728797Z "sql": "insert into logs (line) values (:_request_http_version)", | |
2021-07-11T02:17:19.1729952Z "write": True, | |
2021-07-11T02:17:19.1730318Z }, | |
2021-07-11T02:17:19.1730698Z "get_uuid": { | |
2021-07-11T02:17:19.1731104Z "sql": "select :_uuid_new", | |
2021-07-11T02:17:19.1731463Z }, | |
2021-07-11T02:17:19.1731780Z } | |
2021-07-11T02:17:19.1732076Z } | |
2021-07-11T02:17:19.1732351Z } | |
2021-07-11T02:17:19.1732630Z }, | |
2021-07-11T02:17:19.1732936Z ) as client: | |
2021-07-11T02:17:19.1733436Z response = client.post("/data/runme", {}, csrftoken_from=True) | |
2021-07-11T02:17:19.1734016Z assert 200 == response.status | |
2021-07-11T02:17:19.1734611Z actual = client.get("/data/logs.json?_sort_desc=rowid&_shape=array").json | |
2021-07-11T02:17:19.1735180Z assert [{"rowid": 1, "line": "1.1"}] == actual | |
2021-07-11T02:17:19.1735661Z # Now try the GET request against get_uuid | |
2021-07-11T02:17:19.1736251Z response_get = client.get("/data/get_uuid.json?_shape=array") | |
2021-07-11T02:17:19.1736811Z assert 200 == response_get.status | |
2021-07-11T02:17:19.1737311Z new_uuid = response_get.json[0][":_uuid_new"] | |
2021-07-11T02:17:19.1737782Z > assert 4 == new_uuid.count("-") | |
2021-07-11T02:17:19.1738042Z | |
2021-07-11T02:17:19.1738490Z D:\a\datasette\datasette\tests\test_plugins.py:758: | |
2021-07-11T02:17:19.1738976Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1739535Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1740098Z next(self.gen) | |
2021-07-11T02:17:19.1740677Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1741287Z yield TestClient(ds) | |
2021-07-11T02:17:19.1741876Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1742445Z self.cleanup() | |
2021-07-11T02:17:19.1743013Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1743629Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1744214Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1744824Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1745464Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1746119Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1746575Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1746813Z | |
2021-07-11T02:17:19.1747282Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpsbdikbsp' | |
2021-07-11T02:17:19.1747923Z onerror = <function rmtree.<locals>.onerror at 0x000001D1BA0F1D90> | |
2021-07-11T02:17:19.1748296Z | |
2021-07-11T02:17:19.1748671Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1749041Z try: | |
2021-07-11T02:17:19.1749415Z if os.path.islink(path): | |
2021-07-11T02:17:19.1749954Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1750948Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1751460Z except OSError: | |
2021-07-11T02:17:19.1751962Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1752546Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1752968Z return | |
2021-07-11T02:17:19.1753284Z names = [] | |
2021-07-11T02:17:19.1753575Z try: | |
2021-07-11T02:17:19.1753936Z names = os.listdir(path) | |
2021-07-11T02:17:19.1754326Z except OSError: | |
2021-07-11T02:17:19.1754793Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1755248Z for name in names: | |
2021-07-11T02:17:19.1755680Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1756082Z try: | |
2021-07-11T02:17:19.1756551Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1756973Z except OSError: | |
2021-07-11T02:17:19.1757328Z mode = 0 | |
2021-07-11T02:17:19.1757697Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1758143Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1758557Z else: | |
2021-07-11T02:17:19.1758853Z try: | |
2021-07-11T02:17:19.1759213Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1760140Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpsbdikbsp\\data.db' | |
2021-07-11T02:17:19.1760936Z | |
2021-07-11T02:17:19.1761477Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1762134Z _____________________________ test_hook_forbidden _____________________________ | |
2021-07-11T02:17:19.1762421Z | |
2021-07-11T02:17:19.1762774Z restore_working_directory = None | |
2021-07-11T02:17:19.1763060Z | |
2021-07-11T02:17:19.1763492Z def test_hook_forbidden(restore_working_directory): | |
2021-07-11T02:17:19.1763989Z with make_app_client( | |
2021-07-11T02:17:19.1764496Z extra_databases={"data2.db": "create table logs (line text)"}, | |
2021-07-11T02:17:19.1764999Z metadata={"allow": {}}, | |
2021-07-11T02:17:19.1765357Z ) as client: | |
2021-07-11T02:17:19.1765737Z response = client.get("/") | |
2021-07-11T02:17:19.1766206Z assert 403 == response.status | |
2021-07-11T02:17:19.1766763Z response2 = client.get("/data2", allow_redirects=False) | |
2021-07-11T02:17:19.1767339Z assert 302 == response2.status | |
2021-07-11T02:17:19.1768008Z assert "/login?message=view-database" == response2.headers["Location"] | |
2021-07-11T02:17:19.1768816Z > assert "view-database" == client.ds._last_forbidden_message | |
2021-07-11T02:17:19.1769211Z | |
2021-07-11T02:17:19.1769656Z D:\a\datasette\datasette\tests\test_plugins.py:771: | |
2021-07-11T02:17:19.1770143Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1770752Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.1771313Z next(self.gen) | |
2021-07-11T02:17:19.1771851Z D:\a\datasette\datasette\tests\fixtures.py:156: in make_app_client | |
2021-07-11T02:17:19.1772396Z yield TestClient(ds) | |
2021-07-11T02:17:19.1772980Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:809: in __exit__ | |
2021-07-11T02:17:19.1773543Z self.cleanup() | |
2021-07-11T02:17:19.1774108Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.1774726Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.1775310Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.1775917Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.1776557Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:395: in _rmtree_unsafe | |
2021-07-11T02:17:19.1777208Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.1777661Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.1777897Z | |
2021-07-11T02:17:19.1778340Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpj_jk89nm' | |
2021-07-11T02:17:19.1778955Z onerror = <function rmtree.<locals>.onerror at 0x000001D1BA14D510> | |
2021-07-11T02:17:19.1779321Z | |
2021-07-11T02:17:19.1779689Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.1780054Z try: | |
2021-07-11T02:17:19.1780425Z if os.path.islink(path): | |
2021-07-11T02:17:19.1781014Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.1781604Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.1782091Z except OSError: | |
2021-07-11T02:17:19.1782580Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.1783191Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.1783614Z return | |
2021-07-11T02:17:19.1783925Z names = [] | |
2021-07-11T02:17:19.1784210Z try: | |
2021-07-11T02:17:19.1784568Z names = os.listdir(path) | |
2021-07-11T02:17:19.1784958Z except OSError: | |
2021-07-11T02:17:19.1785420Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.1785869Z for name in names: | |
2021-07-11T02:17:19.1786296Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.1786698Z try: | |
2021-07-11T02:17:19.1787088Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.1787502Z except OSError: | |
2021-07-11T02:17:19.1787856Z mode = 0 | |
2021-07-11T02:17:19.1788207Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.1788667Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.1789072Z else: | |
2021-07-11T02:17:19.1789367Z try: | |
2021-07-11T02:17:19.1789722Z > os.unlink(fullname) | |
2021-07-11T02:17:19.1790678Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpj_jk89nm\\data2.db' | |
2021-07-11T02:17:19.1791405Z | |
2021-07-11T02:17:19.1791945Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:393: PermissionError | |
2021-07-11T02:17:19.1792652Z __________________ test_publish_cloudrun_prompts_for_service __________________ | |
2021-07-11T02:17:19.1792991Z | |
2021-07-11T02:17:19.1793478Z mock_get_existing_services = <MagicMock name='get_existing_services' id='2000263549728'> | |
2021-07-11T02:17:19.1794106Z mock_call = <MagicMock name='check_call' id='2000263566616'> | |
2021-07-11T02:17:19.1794687Z mock_output = <MagicMock name='check_output' id='2000263419944'> | |
2021-07-11T02:17:19.1795196Z mock_which = <MagicMock name='which' id='2000304065112'> | |
2021-07-11T02:17:19.1795501Z | |
2021-07-11T02:17:19.1795864Z @mock.patch("shutil.which") | |
2021-07-11T02:17:19.1796570Z @mock.patch("datasette.publish.cloudrun.check_output") | |
2021-07-11T02:17:19.1797482Z @mock.patch("datasette.publish.cloudrun.check_call") | |
2021-07-11T02:17:19.1798424Z @mock.patch("datasette.publish.cloudrun.get_existing_services") | |
2021-07-11T02:17:19.1799198Z def test_publish_cloudrun_prompts_for_service( | |
2021-07-11T02:17:19.1799802Z mock_get_existing_services, mock_call, mock_output, mock_which | |
2021-07-11T02:17:19.1800255Z ): | |
2021-07-11T02:17:19.1800720Z mock_get_existing_services.return_value = [ | |
2021-07-11T02:17:19.1801438Z {"name": "existing", "created": "2019-01-01", "url": "http://www.example.com/"} | |
2021-07-11T02:17:19.1801965Z ] | |
2021-07-11T02:17:19.1802369Z mock_output.return_value = "myproject" | |
2021-07-11T02:17:19.1802873Z mock_which.return_value = True | |
2021-07-11T02:17:19.1803305Z runner = CliRunner() | |
2021-07-11T02:17:19.1803772Z with runner.isolated_filesystem(): | |
2021-07-11T02:17:19.1804263Z with open("test.db", "w") as fp: | |
2021-07-11T02:17:19.1804671Z fp.write("data") | |
2021-07-11T02:17:19.1805074Z result = runner.invoke( | |
2021-07-11T02:17:19.1805660Z cli.cli, ["publish", "cloudrun", "test.db"], input="input-service" | |
2021-07-11T02:17:19.1806150Z ) | |
2021-07-11T02:17:19.1806447Z assert ( | |
2021-07-11T02:17:19.1806756Z """ | |
2021-07-11T02:17:19.1807188Z Please provide a service name for this deployment | |
2021-07-11T02:17:19.1807614Z | |
2021-07-11T02:17:19.1808048Z Using an existing service name will over-write it | |
2021-07-11T02:17:19.1808455Z | |
2021-07-11T02:17:19.1808803Z Your existing services: | |
2021-07-11T02:17:19.1809152Z | |
2021-07-11T02:17:19.1809648Z existing - created 2019-01-01 - http://www.example.com/ | |
2021-07-11T02:17:19.1810131Z | |
2021-07-11T02:17:19.1810606Z Service name: input-service | |
2021-07-11T02:17:19.1811006Z """.strip() | |
2021-07-11T02:17:19.1811426Z == result.output.strip() | |
2021-07-11T02:17:19.1811810Z ) | |
2021-07-11T02:17:19.1812173Z > assert 0 == result.exit_code | |
2021-07-11T02:17:19.1812647Z E AssertionError: assert 0 == 1 | |
2021-07-11T02:17:19.1813427Z E + where 1 = <Result PermissionError(13, 'The process cannot access the file because it is being used by another process')>.exit_code | |
2021-07-11T02:17:19.1814009Z | |
2021-07-11T02:17:19.1814552Z D:\a\datasette\datasette\tests\test_publish_cloudrun.py:63: AssertionError | |
2021-07-11T02:17:19.1815204Z ____________________________ test_publish_cloudrun ____________________________ | |
2021-07-11T02:17:19.1815483Z | |
2021-07-11T02:17:19.1815877Z mock_call = <MagicMock name='check_call' id='2000303372832'> | |
2021-07-11T02:17:19.1816414Z mock_output = <MagicMock name='check_output' id='2000263419608'> | |
2021-07-11T02:17:19.1816926Z mock_which = <MagicMock name='which' id='2000283242448'> | |
2021-07-11T02:17:19.1817227Z | |
2021-07-11T02:17:19.1817589Z @mock.patch("shutil.which") | |
2021-07-11T02:17:19.1818284Z @mock.patch("datasette.publish.cloudrun.check_output") | |
2021-07-11T02:17:19.1819202Z @mock.patch("datasette.publish.cloudrun.check_call") | |
2021-07-11T02:17:19.1819975Z def test_publish_cloudrun(mock_call, mock_output, mock_which): | |
2021-07-11T02:17:19.1820591Z mock_output.return_value = "myproject" | |
2021-07-11T02:17:19.1821097Z mock_which.return_value = True | |
2021-07-11T02:17:19.1821535Z runner = CliRunner() | |
2021-07-11T02:17:19.1821999Z with runner.isolated_filesystem(): | |
2021-07-11T02:17:19.1822488Z with open("test.db", "w") as fp: | |
2021-07-11T02:17:19.1822889Z fp.write("data") | |
2021-07-11T02:17:19.1823344Z result = runner.invoke( | |
2021-07-11T02:17:19.1823900Z cli.cli, ["publish", "cloudrun", "test.db", "--service", "test"] | |
2021-07-11T02:17:19.1824348Z ) | |
2021-07-11T02:17:19.1824700Z > assert 0 == result.exit_code | |
2021-07-11T02:17:19.1825164Z E AssertionError: assert 0 == 1 | |
2021-07-11T02:17:19.1825948Z E + where 1 = <Result PermissionError(13, 'The process cannot access the file because it is being used by another process')>.exit_code | |
2021-07-11T02:17:19.1826514Z | |
2021-07-11T02:17:19.1827058Z D:\a\datasette\datasette\tests\test_publish_cloudrun.py:91: AssertionError | |
2021-07-11T02:17:19.1827751Z ___________________ test_publish_cloudrun_memory[1Gi-False] ___________________ | |
2021-07-11T02:17:19.1828091Z | |
2021-07-11T02:17:19.1828465Z mock_call = <MagicMock name='check_call' id='2000284318856'> | |
2021-07-11T02:17:19.1828994Z mock_output = <MagicMock name='check_output' id='2000263740104'> | |
2021-07-11T02:17:19.1829552Z mock_which = <MagicMock name='which' id='2000282812824'>, memory = '1Gi' | |
2021-07-11T02:17:19.1829995Z should_fail = False | |
2021-07-11T02:17:19.1830227Z | |
2021-07-11T02:17:19.1830638Z @mock.patch("shutil.which") | |
2021-07-11T02:17:19.1831323Z @mock.patch("datasette.publish.cloudrun.check_output") | |
2021-07-11T02:17:19.1832239Z @mock.patch("datasette.publish.cloudrun.check_call") | |
2021-07-11T02:17:19.1832973Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1833461Z "memory,should_fail", | |
2021-07-11T02:17:19.1833811Z [ | |
2021-07-11T02:17:19.1834106Z ["1Gi", False], | |
2021-07-11T02:17:19.1834441Z ["2G", False], | |
2021-07-11T02:17:19.1834772Z ["256Mi", False], | |
2021-07-11T02:17:19.1835083Z ["4", True], | |
2021-07-11T02:17:19.1835402Z ["GB", True], | |
2021-07-11T02:17:19.1835699Z ], | |
2021-07-11T02:17:19.1835961Z ) | |
2021-07-11T02:17:19.1836334Z def test_publish_cloudrun_memory( | |
2021-07-11T02:17:19.1836862Z mock_call, mock_output, mock_which, memory, should_fail | |
2021-07-11T02:17:19.1837268Z ): | |
2021-07-11T02:17:19.1837675Z mock_output.return_value = "myproject" | |
2021-07-11T02:17:19.1838221Z mock_which.return_value = True | |
2021-07-11T02:17:19.1838656Z runner = CliRunner() | |
2021-07-11T02:17:19.1839128Z with runner.isolated_filesystem(): | |
2021-07-11T02:17:19.1839602Z with open("test.db", "w") as fp: | |
2021-07-11T02:17:19.1840006Z fp.write("data") | |
2021-07-11T02:17:19.1840423Z result = runner.invoke( | |
2021-07-11T02:17:19.1840854Z cli.cli, | |
2021-07-11T02:17:19.1841361Z ["publish", "cloudrun", "test.db", "--service", "test", "--memory", memory], | |
2021-07-11T02:17:19.1841832Z ) | |
2021-07-11T02:17:19.1842137Z if should_fail: | |
2021-07-11T02:17:19.1842555Z assert 2 == result.exit_code | |
2021-07-11T02:17:19.1842933Z return | |
2021-07-11T02:17:19.1843318Z > assert 0 == result.exit_code | |
2021-07-11T02:17:19.1843786Z E AssertionError: assert 0 == 1 | |
2021-07-11T02:17:19.1844561Z E + where 1 = <Result PermissionError(13, 'The process cannot access the file because it is being used by another process')>.exit_code | |
2021-07-11T02:17:19.1845152Z | |
2021-07-11T02:17:19.1845700Z D:\a\datasette\datasette\tests\test_publish_cloudrun.py:135: AssertionError | |
2021-07-11T02:17:19.1846387Z ___________________ test_publish_cloudrun_memory[2G-False] ____________________ | |
2021-07-11T02:17:19.1846716Z | |
2021-07-11T02:17:19.1847089Z mock_call = <MagicMock name='check_call' id='2000284318128'> | |
2021-07-11T02:17:19.1847623Z mock_output = <MagicMock name='check_output' id='2000263851872'> | |
2021-07-11T02:17:19.1848165Z mock_which = <MagicMock name='which' id='2000304410352'>, memory = '2G' | |
2021-07-11T02:17:19.1848612Z should_fail = False | |
2021-07-11T02:17:19.1848843Z | |
2021-07-11T02:17:19.1849205Z @mock.patch("shutil.which") | |
2021-07-11T02:17:19.1849887Z @mock.patch("datasette.publish.cloudrun.check_output") | |
2021-07-11T02:17:19.1850917Z @mock.patch("datasette.publish.cloudrun.check_call") | |
2021-07-11T02:17:19.1851660Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1852146Z "memory,should_fail", | |
2021-07-11T02:17:19.1852519Z [ | |
2021-07-11T02:17:19.1852814Z ["1Gi", False], | |
2021-07-11T02:17:19.1853147Z ["2G", False], | |
2021-07-11T02:17:19.1853482Z ["256Mi", False], | |
2021-07-11T02:17:19.1853792Z ["4", True], | |
2021-07-11T02:17:19.1854109Z ["GB", True], | |
2021-07-11T02:17:19.1854409Z ], | |
2021-07-11T02:17:19.1854665Z ) | |
2021-07-11T02:17:19.1855038Z def test_publish_cloudrun_memory( | |
2021-07-11T02:17:19.1855559Z mock_call, mock_output, mock_which, memory, should_fail | |
2021-07-11T02:17:19.1855975Z ): | |
2021-07-11T02:17:19.1856383Z mock_output.return_value = "myproject" | |
2021-07-11T02:17:19.1856876Z mock_which.return_value = True | |
2021-07-11T02:17:19.1857311Z runner = CliRunner() | |
2021-07-11T02:17:19.1857781Z with runner.isolated_filesystem(): | |
2021-07-11T02:17:19.1858253Z with open("test.db", "w") as fp: | |
2021-07-11T02:17:19.1858661Z fp.write("data") | |
2021-07-11T02:17:19.1859077Z result = runner.invoke( | |
2021-07-11T02:17:19.1859460Z cli.cli, | |
2021-07-11T02:17:19.1859970Z ["publish", "cloudrun", "test.db", "--service", "test", "--memory", memory], | |
2021-07-11T02:17:19.1860425Z ) | |
2021-07-11T02:17:19.1860802Z if should_fail: | |
2021-07-11T02:17:19.1861219Z assert 2 == result.exit_code | |
2021-07-11T02:17:19.1861599Z return | |
2021-07-11T02:17:19.1861982Z > assert 0 == result.exit_code | |
2021-07-11T02:17:19.1862448Z E AssertionError: assert 0 == 1 | |
2021-07-11T02:17:19.1863227Z E + where 1 = <Result PermissionError(13, 'The process cannot access the file because it is being used by another process')>.exit_code | |
2021-07-11T02:17:19.1863806Z | |
2021-07-11T02:17:19.1864353Z D:\a\datasette\datasette\tests\test_publish_cloudrun.py:135: AssertionError | |
2021-07-11T02:17:19.1865096Z __________________ test_publish_cloudrun_memory[256Mi-False] __________________ | |
2021-07-11T02:17:19.1865421Z | |
2021-07-11T02:17:19.1865812Z mock_call = <MagicMock name='check_call' id='2000263849464'> | |
2021-07-11T02:17:19.1866346Z mock_output = <MagicMock name='check_output' id='2000304500688'> | |
2021-07-11T02:17:19.1866892Z mock_which = <MagicMock name='which' id='2000260725784'>, memory = '256Mi' | |
2021-07-11T02:17:19.1867348Z should_fail = False | |
2021-07-11T02:17:19.1867581Z | |
2021-07-11T02:17:19.1867927Z @mock.patch("shutil.which") | |
2021-07-11T02:17:19.1868637Z @mock.patch("datasette.publish.cloudrun.check_output") | |
2021-07-11T02:17:19.1869553Z @mock.patch("datasette.publish.cloudrun.check_call") | |
2021-07-11T02:17:19.1870278Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1871115Z "memory,should_fail", | |
2021-07-11T02:17:19.1871472Z [ | |
2021-07-11T02:17:19.1871769Z ["1Gi", False], | |
2021-07-11T02:17:19.1872104Z ["2G", False], | |
2021-07-11T02:17:19.1872443Z ["256Mi", False], | |
2021-07-11T02:17:19.1872755Z ["4", True], | |
2021-07-11T02:17:19.1873077Z ["GB", True], | |
2021-07-11T02:17:19.1873364Z ], | |
2021-07-11T02:17:19.1873633Z ) | |
2021-07-11T02:17:19.1874008Z def test_publish_cloudrun_memory( | |
2021-07-11T02:17:19.1874532Z mock_call, mock_output, mock_which, memory, should_fail | |
2021-07-11T02:17:19.1874951Z ): | |
2021-07-11T02:17:19.1875362Z mock_output.return_value = "myproject" | |
2021-07-11T02:17:19.1875849Z mock_which.return_value = True | |
2021-07-11T02:17:19.1876286Z runner = CliRunner() | |
2021-07-11T02:17:19.1876756Z with runner.isolated_filesystem(): | |
2021-07-11T02:17:19.1877230Z with open("test.db", "w") as fp: | |
2021-07-11T02:17:19.1877634Z fp.write("data") | |
2021-07-11T02:17:19.1878748Z result = runner.invoke( | |
2021-07-11T02:17:19.1879146Z cli.cli, | |
2021-07-11T02:17:19.1879667Z ["publish", "cloudrun", "test.db", "--service", "test", "--memory", memory], | |
2021-07-11T02:17:19.1880127Z ) | |
2021-07-11T02:17:19.1880449Z if should_fail: | |
2021-07-11T02:17:19.1880927Z assert 2 == result.exit_code | |
2021-07-11T02:17:19.1881309Z return | |
2021-07-11T02:17:19.1881691Z > assert 0 == result.exit_code | |
2021-07-11T02:17:19.1882160Z E AssertionError: assert 0 == 1 | |
2021-07-11T02:17:19.1882926Z E + where 1 = <Result PermissionError(13, 'The process cannot access the file because it is being used by another process')>.exit_code | |
2021-07-11T02:17:19.1883501Z | |
2021-07-11T02:17:19.1884045Z D:\a\datasette\datasette\tests\test_publish_cloudrun.py:135: AssertionError | |
2021-07-11T02:17:19.1884716Z ____________________ test_publish_cloudrun_plugin_secrets _____________________ | |
2021-07-11T02:17:19.1885048Z | |
2021-07-11T02:17:19.1885449Z mock_call = <MagicMock name='check_call' id='2000263626256'> | |
2021-07-11T02:17:19.1885984Z mock_output = <MagicMock name='check_output' id='2000263624296'> | |
2021-07-11T02:17:19.1886493Z mock_which = <MagicMock name='which' id='2000304303016'> | |
2021-07-11T02:17:19.1886789Z | |
2021-07-11T02:17:19.1887149Z @mock.patch("shutil.which") | |
2021-07-11T02:17:19.1887845Z @mock.patch("datasette.publish.cloudrun.check_output") | |
2021-07-11T02:17:19.1888759Z @mock.patch("datasette.publish.cloudrun.check_call") | |
2021-07-11T02:17:19.1889573Z def test_publish_cloudrun_plugin_secrets(mock_call, mock_output, mock_which): | |
2021-07-11T02:17:19.1890154Z mock_which.return_value = True | |
2021-07-11T02:17:19.1890711Z mock_output.return_value = "myproject" | |
2021-07-11T02:17:19.1891123Z | |
2021-07-11T02:17:19.1891443Z runner = CliRunner() | |
2021-07-11T02:17:19.1891922Z with runner.isolated_filesystem(): | |
2021-07-11T02:17:19.1892415Z with open("test.db", "w") as fp: | |
2021-07-11T02:17:19.1892806Z fp.write("data") | |
2021-07-11T02:17:19.1893305Z with open("metadata.yml", "w") as fp: | |
2021-07-11T02:17:19.1893719Z fp.write( | |
2021-07-11T02:17:19.1894127Z textwrap.dedent( | |
2021-07-11T02:17:19.1894506Z """ | |
2021-07-11T02:17:19.1894889Z title: Hello from metadata YAML | |
2021-07-11T02:17:19.1895309Z plugins: | |
2021-07-11T02:17:19.1895775Z datasette-auth-github: | |
2021-07-11T02:17:19.1896211Z foo: bar | |
2021-07-11T02:17:19.1896523Z """ | |
2021-07-11T02:17:19.1896839Z ).strip() | |
2021-07-11T02:17:19.1897139Z ) | |
2021-07-11T02:17:19.1897508Z result = runner.invoke( | |
2021-07-11T02:17:19.1897888Z cli.cli, | |
2021-07-11T02:17:19.1898202Z [ | |
2021-07-11T02:17:19.1898528Z "publish", | |
2021-07-11T02:17:19.1898872Z "cloudrun", | |
2021-07-11T02:17:19.1899221Z "test.db", | |
2021-07-11T02:17:19.1899582Z "--metadata", | |
2021-07-11T02:17:19.1899956Z "metadata.yml", | |
2021-07-11T02:17:19.1900343Z "--service", | |
2021-07-11T02:17:19.1900767Z "datasette", | |
2021-07-11T02:17:19.1901161Z "--plugin-secret", | |
2021-07-11T02:17:19.1901666Z "datasette-auth-github", | |
2021-07-11T02:17:19.1902112Z "client_id", | |
2021-07-11T02:17:19.1902482Z "x-client-id", | |
2021-07-11T02:17:19.1902873Z "--show-files", | |
2021-07-11T02:17:19.1903231Z "--secret", | |
2021-07-11T02:17:19.1903585Z "x-secret", | |
2021-07-11T02:17:19.1903906Z ], | |
2021-07-11T02:17:19.1904176Z ) | |
2021-07-11T02:17:19.1904545Z > assert result.exit_code == 0 | |
2021-07-11T02:17:19.1905067Z E AssertionError: assert 1 == 0 | |
2021-07-11T02:17:19.1905842Z E + where 1 = <Result PermissionError(13, 'The process cannot access the file because it is being used by another process')>.exit_code | |
2021-07-11T02:17:19.1906423Z | |
2021-07-11T02:17:19.1906969Z D:\a\datasette\datasette\tests\test_publish_cloudrun.py:191: AssertionError | |
2021-07-11T02:17:19.1907638Z ____________________ test_publish_cloudrun_apt_get_install ____________________ | |
2021-07-11T02:17:19.1907968Z | |
2021-07-11T02:17:19.1908359Z mock_call = <MagicMock name='check_call' id='2000284400384'> | |
2021-07-11T02:17:19.1908894Z mock_output = <MagicMock name='check_output' id='2000303790344'> | |
2021-07-11T02:17:19.1909403Z mock_which = <MagicMock name='which' id='2000281326480'> | |
2021-07-11T02:17:19.1909704Z | |
2021-07-11T02:17:19.1910069Z @mock.patch("shutil.which") | |
2021-07-11T02:17:19.1910802Z @mock.patch("datasette.publish.cloudrun.check_output") | |
2021-07-11T02:17:19.1911722Z @mock.patch("datasette.publish.cloudrun.check_call") | |
2021-07-11T02:17:19.1912534Z def test_publish_cloudrun_apt_get_install(mock_call, mock_output, mock_which): | |
2021-07-11T02:17:19.1913119Z mock_which.return_value = True | |
2021-07-11T02:17:19.1913627Z mock_output.return_value = "myproject" | |
2021-07-11T02:17:19.1914029Z | |
2021-07-11T02:17:19.1914350Z runner = CliRunner() | |
2021-07-11T02:17:19.1914825Z with runner.isolated_filesystem(): | |
2021-07-11T02:17:19.1915301Z with open("test.db", "w") as fp: | |
2021-07-11T02:17:19.1915706Z fp.write("data") | |
2021-07-11T02:17:19.1916121Z result = runner.invoke( | |
2021-07-11T02:17:19.1916506Z cli.cli, | |
2021-07-11T02:17:19.1916818Z [ | |
2021-07-11T02:17:19.1917146Z "publish", | |
2021-07-11T02:17:19.1917488Z "cloudrun", | |
2021-07-11T02:17:19.1917840Z "test.db", | |
2021-07-11T02:17:19.1918199Z "--service", | |
2021-07-11T02:17:19.1918559Z "datasette", | |
2021-07-11T02:17:19.1918948Z "--show-files", | |
2021-07-11T02:17:19.1919371Z "--secret", | |
2021-07-11T02:17:19.1919728Z "x-secret", | |
2021-07-11T02:17:19.1920133Z "--apt-get-install", | |
2021-07-11T02:17:19.1920528Z "ripgrep", | |
2021-07-11T02:17:19.1920961Z "--spatialite", | |
2021-07-11T02:17:19.1921301Z ], | |
2021-07-11T02:17:19.1921571Z ) | |
2021-07-11T02:17:19.1921936Z > assert result.exit_code == 0 | |
2021-07-11T02:17:19.1922402Z E AssertionError: assert 1 == 0 | |
2021-07-11T02:17:19.1923176Z E + where 1 = <Result PermissionError(13, 'The process cannot access the file because it is being used by another process')>.exit_code | |
2021-07-11T02:17:19.1923757Z | |
2021-07-11T02:17:19.1924298Z D:\a\datasette\datasette\tests\test_publish_cloudrun.py:255: AssertionError | |
2021-07-11T02:17:19.1925036Z _____ test_publish_cloudrun_extra_options[---setting force_https_urls on] _____ | |
2021-07-11T02:17:19.1925428Z | |
2021-07-11T02:17:19.1925820Z mock_call = <MagicMock name='check_call' id='2000302365552'> | |
2021-07-11T02:17:19.1926356Z mock_output = <MagicMock name='check_output' id='2000263627496'> | |
2021-07-11T02:17:19.1926915Z mock_which = <MagicMock name='which' id='2000284538248'>, extra_options = '' | |
2021-07-11T02:17:19.1927472Z expected = '--setting force_https_urls on' | |
2021-07-11T02:17:19.1927782Z | |
2021-07-11T02:17:19.1928128Z @mock.patch("shutil.which") | |
2021-07-11T02:17:19.1928835Z @mock.patch("datasette.publish.cloudrun.check_output") | |
2021-07-11T02:17:19.1929755Z @mock.patch("datasette.publish.cloudrun.check_call") | |
2021-07-11T02:17:19.1930485Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1931072Z "extra_options,expected", | |
2021-07-11T02:17:19.1931459Z [ | |
2021-07-11T02:17:19.1931824Z ("", "--setting force_https_urls on"), | |
2021-07-11T02:17:19.1932250Z ( | |
2021-07-11T02:17:19.1932590Z "--setting base_url /foo", | |
2021-07-11T02:17:19.1933099Z "--setting base_url /foo --setting force_https_urls on", | |
2021-07-11T02:17:19.1933529Z ), | |
2021-07-11T02:17:19.1933987Z ("--setting force_https_urls off", "--setting force_https_urls off"), | |
2021-07-11T02:17:19.1934442Z ], | |
2021-07-11T02:17:19.1934710Z ) | |
2021-07-11T02:17:19.1935093Z def test_publish_cloudrun_extra_options( | |
2021-07-11T02:17:19.1935685Z mock_call, mock_output, mock_which, extra_options, expected | |
2021-07-11T02:17:19.1936138Z ): | |
2021-07-11T02:17:19.1936495Z mock_which.return_value = True | |
2021-07-11T02:17:19.1936999Z mock_output.return_value = "myproject" | |
2021-07-11T02:17:19.1937397Z | |
2021-07-11T02:17:19.1937716Z runner = CliRunner() | |
2021-07-11T02:17:19.1938195Z with runner.isolated_filesystem(): | |
2021-07-11T02:17:19.1938672Z with open("test.db", "w") as fp: | |
2021-07-11T02:17:19.1939080Z fp.write("data") | |
2021-07-11T02:17:19.1939495Z result = runner.invoke( | |
2021-07-11T02:17:19.1939880Z cli.cli, | |
2021-07-11T02:17:19.1940195Z [ | |
2021-07-11T02:17:19.1940521Z "publish", | |
2021-07-11T02:17:19.1940906Z "cloudrun", | |
2021-07-11T02:17:19.1941257Z "test.db", | |
2021-07-11T02:17:19.1941604Z "--service", | |
2021-07-11T02:17:19.1941978Z "datasette", | |
2021-07-11T02:17:19.1942359Z "--show-files", | |
2021-07-11T02:17:19.1942771Z "--extra-options", | |
2021-07-11T02:17:19.1943187Z extra_options, | |
2021-07-11T02:17:19.1943525Z ], | |
2021-07-11T02:17:19.1943792Z ) | |
2021-07-11T02:17:19.1944156Z > assert result.exit_code == 0 | |
2021-07-11T02:17:19.1944620Z E AssertionError: assert 1 == 0 | |
2021-07-11T02:17:19.1945391Z E + where 1 = <Result PermissionError(13, 'The process cannot access the file because it is being used by another process')>.exit_code | |
2021-07-11T02:17:19.1945970Z | |
2021-07-11T02:17:19.1946571Z D:\a\datasette\datasette\tests\test_publish_cloudrun.py:320: AssertionError | |
2021-07-11T02:17:19.1947462Z _ test_publish_cloudrun_extra_options[--setting base_url /foo---setting base_url /foo --setting force_https_urls on] _ | |
2021-07-11T02:17:19.1947992Z | |
2021-07-11T02:17:19.1948385Z mock_call = <MagicMock name='check_call' id='2000241204472'> | |
2021-07-11T02:17:19.1948917Z mock_output = <MagicMock name='check_output' id='2000304513376'> | |
2021-07-11T02:17:19.1949432Z mock_which = <MagicMock name='which' id='2000257899600'> | |
2021-07-11T02:17:19.1949920Z extra_options = '--setting base_url /foo' | |
2021-07-11T02:17:19.1950489Z expected = '--setting base_url /foo --setting force_https_urls on' | |
2021-07-11T02:17:19.1950906Z | |
2021-07-11T02:17:19.1951268Z @mock.patch("shutil.which") | |
2021-07-11T02:17:19.1951977Z @mock.patch("datasette.publish.cloudrun.check_output") | |
2021-07-11T02:17:19.1952910Z @mock.patch("datasette.publish.cloudrun.check_call") | |
2021-07-11T02:17:19.1953649Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1954191Z "extra_options,expected", | |
2021-07-11T02:17:19.1954573Z [ | |
2021-07-11T02:17:19.1954945Z ("", "--setting force_https_urls on"), | |
2021-07-11T02:17:19.1955311Z ( | |
2021-07-11T02:17:19.1955652Z "--setting base_url /foo", | |
2021-07-11T02:17:19.1956161Z "--setting base_url /foo --setting force_https_urls on", | |
2021-07-11T02:17:19.1956582Z ), | |
2021-07-11T02:17:19.1957055Z ("--setting force_https_urls off", "--setting force_https_urls off"), | |
2021-07-11T02:17:19.1957507Z ], | |
2021-07-11T02:17:19.1957761Z ) | |
2021-07-11T02:17:19.1958154Z def test_publish_cloudrun_extra_options( | |
2021-07-11T02:17:19.1958743Z mock_call, mock_output, mock_which, extra_options, expected | |
2021-07-11T02:17:19.1959243Z ): | |
2021-07-11T02:17:19.1959616Z mock_which.return_value = True | |
2021-07-11T02:17:19.1960125Z mock_output.return_value = "myproject" | |
2021-07-11T02:17:19.1960513Z | |
2021-07-11T02:17:19.1960892Z runner = CliRunner() | |
2021-07-11T02:17:19.1961356Z with runner.isolated_filesystem(): | |
2021-07-11T02:17:19.1961845Z with open("test.db", "w") as fp: | |
2021-07-11T02:17:19.1962252Z fp.write("data") | |
2021-07-11T02:17:19.1962661Z result = runner.invoke( | |
2021-07-11T02:17:19.1963059Z cli.cli, | |
2021-07-11T02:17:19.1963371Z [ | |
2021-07-11T02:17:19.1963685Z "publish", | |
2021-07-11T02:17:19.1964038Z "cloudrun", | |
2021-07-11T02:17:19.1964390Z "test.db", | |
2021-07-11T02:17:19.1964735Z "--service", | |
2021-07-11T02:17:19.1965104Z "datasette", | |
2021-07-11T02:17:19.1965476Z "--show-files", | |
2021-07-11T02:17:19.1965895Z "--extra-options", | |
2021-07-11T02:17:19.1966308Z extra_options, | |
2021-07-11T02:17:19.1966634Z ], | |
2021-07-11T02:17:19.1966924Z ) | |
2021-07-11T02:17:19.1967289Z > assert result.exit_code == 0 | |
2021-07-11T02:17:19.1967744Z E AssertionError: assert 1 == 0 | |
2021-07-11T02:17:19.1968531Z E + where 1 = <Result PermissionError(13, 'The process cannot access the file because it is being used by another process')>.exit_code | |
2021-07-11T02:17:19.1969113Z | |
2021-07-11T02:17:19.1969645Z D:\a\datasette\datasette\tests\test_publish_cloudrun.py:320: AssertionError | |
2021-07-11T02:17:19.1970496Z _ test_publish_cloudrun_extra_options[--setting force_https_urls off---setting force_https_urls off] _ | |
2021-07-11T02:17:19.1971042Z | |
2021-07-11T02:17:19.1971432Z mock_call = <MagicMock name='check_call' id='2000304432688'> | |
2021-07-11T02:17:19.1971951Z mock_output = <MagicMock name='check_output' id='2000263625304'> | |
2021-07-11T02:17:19.1972478Z mock_which = <MagicMock name='which' id='2000305145896'> | |
2021-07-11T02:17:19.1972992Z extra_options = '--setting force_https_urls off' | |
2021-07-11T02:17:19.1973550Z expected = '--setting force_https_urls off' | |
2021-07-11T02:17:19.1973869Z | |
2021-07-11T02:17:19.1974234Z @mock.patch("shutil.which") | |
2021-07-11T02:17:19.1974933Z @mock.patch("datasette.publish.cloudrun.check_output") | |
2021-07-11T02:17:19.1975851Z @mock.patch("datasette.publish.cloudrun.check_call") | |
2021-07-11T02:17:19.1976592Z @pytest.mark.parametrize( | |
2021-07-11T02:17:19.1977120Z "extra_options,expected", | |
2021-07-11T02:17:19.1977509Z [ | |
2021-07-11T02:17:19.1977880Z ("", "--setting force_https_urls on"), | |
2021-07-11T02:17:19.1978234Z ( | |
2021-07-11T02:17:19.1978585Z "--setting base_url /foo", | |
2021-07-11T02:17:19.1979090Z "--setting base_url /foo --setting force_https_urls on", | |
2021-07-11T02:17:19.1979512Z ), | |
2021-07-11T02:17:19.1979989Z ("--setting force_https_urls off", "--setting force_https_urls off"), | |
2021-07-11T02:17:19.1980430Z ], | |
2021-07-11T02:17:19.1980744Z ) | |
2021-07-11T02:17:19.1981141Z def test_publish_cloudrun_extra_options( | |
2021-07-11T02:17:19.1981713Z mock_call, mock_output, mock_which, extra_options, expected | |
2021-07-11T02:17:19.1982165Z ): | |
2021-07-11T02:17:19.1982539Z mock_which.return_value = True | |
2021-07-11T02:17:19.1983033Z mock_output.return_value = "myproject" | |
2021-07-11T02:17:19.1983429Z | |
2021-07-11T02:17:19.1983758Z runner = CliRunner() | |
2021-07-11T02:17:19.1984224Z with runner.isolated_filesystem(): | |
2021-07-11T02:17:19.1984708Z with open("test.db", "w") as fp: | |
2021-07-11T02:17:19.1985096Z fp.write("data") | |
2021-07-11T02:17:19.1985508Z result = runner.invoke( | |
2021-07-11T02:17:19.1985901Z cli.cli, | |
2021-07-11T02:17:19.1986201Z [ | |
2021-07-11T02:17:19.1986567Z "publish", | |
2021-07-11T02:17:19.1986921Z "cloudrun", | |
2021-07-11T02:17:19.1987263Z "test.db", | |
2021-07-11T02:17:19.1987617Z "--service", | |
2021-07-11T02:17:19.1987978Z "datasette", | |
2021-07-11T02:17:19.1988359Z "--show-files", | |
2021-07-11T02:17:19.1988778Z "--extra-options", | |
2021-07-11T02:17:19.1989176Z extra_options, | |
2021-07-11T02:17:19.1989512Z ], | |
2021-07-11T02:17:19.1989793Z ) | |
2021-07-11T02:17:19.1990147Z > assert result.exit_code == 0 | |
2021-07-11T02:17:19.1990690Z E AssertionError: assert 1 == 0 | |
2021-07-11T02:17:19.1991477Z E + where 1 = <Result PermissionError(13, 'The process cannot access the file because it is being used by another process')>.exit_code | |
2021-07-11T02:17:19.1992063Z | |
2021-07-11T02:17:19.1992602Z D:\a\datasette\datasette\tests\test_publish_cloudrun.py:320: AssertionError | |
2021-07-11T02:17:19.1993253Z _____________________________ test_publish_heroku _____________________________ | |
2021-07-11T02:17:19.1993539Z | |
2021-07-11T02:17:19.1993897Z mock_call = <MagicMock name='call' id='2000304206680'> | |
2021-07-11T02:17:19.1994432Z mock_check_output = <MagicMock name='check_output' id='2000241205032'> | |
2021-07-11T02:17:19.1994975Z mock_which = <MagicMock name='which' id='2000284537184'> | |
2021-07-11T02:17:19.1995274Z | |
2021-07-11T02:17:19.1995624Z @mock.patch("shutil.which") | |
2021-07-11T02:17:19.1996303Z @mock.patch("datasette.publish.heroku.check_output") | |
2021-07-11T02:17:19.1997131Z @mock.patch("datasette.publish.heroku.call") | |
2021-07-11T02:17:19.1997859Z def test_publish_heroku(mock_call, mock_check_output, mock_which): | |
2021-07-11T02:17:19.1998419Z mock_which.return_value = True | |
2021-07-11T02:17:19.1998904Z mock_check_output.side_effect = lambda s: { | |
2021-07-11T02:17:19.1999443Z "['heroku', 'plugins']": b"heroku-builds", | |
2021-07-11T02:17:19.1999936Z "['heroku', 'apps:list', '--json']": b"[]", | |
2021-07-11T02:17:19.2000496Z "['heroku', 'apps:create', 'datasette', '--json']": b'{"name": "f"}', | |
2021-07-11T02:17:19.2000995Z }[repr(s)] | |
2021-07-11T02:17:19.2001354Z runner = CliRunner() | |
2021-07-11T02:17:19.2001813Z with runner.isolated_filesystem(): | |
2021-07-11T02:17:19.2002298Z with open("test.db", "w") as fp: | |
2021-07-11T02:17:19.2002704Z fp.write("data") | |
2021-07-11T02:17:19.2003109Z result = runner.invoke( | |
2021-07-11T02:17:19.2003630Z cli.cli, ["publish", "heroku", "test.db", "--tar", "gtar"] | |
2021-07-11T02:17:19.2004035Z ) | |
2021-07-11T02:17:19.2004464Z > assert 0 == result.exit_code, result.output | |
2021-07-11T02:17:19.2004971Z E AssertionError: | |
2021-07-11T02:17:19.2005336Z E assert 0 == 1 | |
2021-07-11T02:17:19.2006043Z E + where 1 = <Result PermissionError(13, 'The process cannot access the file because it is being used by another process')>.exit_code | |
2021-07-11T02:17:19.2006628Z | |
2021-07-11T02:17:19.2007162Z D:\a\datasette\datasette\tests\test_publish_heroku.py:64: AssertionError | |
2021-07-11T02:17:19.2007823Z _____________________ test_publish_heroku_plugin_secrets ______________________ | |
2021-07-11T02:17:19.2008151Z | |
2021-07-11T02:17:19.2008516Z mock_call = <MagicMock name='call' id='2000302365272'> | |
2021-07-11T02:17:19.2009033Z mock_check_output = <MagicMock name='check_output' id='2000304124088'> | |
2021-07-11T02:17:19.2009569Z mock_which = <MagicMock name='which' id='2000263241512'> | |
2021-07-11T02:17:19.2009866Z | |
2021-07-11T02:17:19.2010228Z @mock.patch("shutil.which") | |
2021-07-11T02:17:19.2010934Z @mock.patch("datasette.publish.heroku.check_output") | |
2021-07-11T02:17:19.2011774Z @mock.patch("datasette.publish.heroku.call") | |
2021-07-11T02:17:19.2012535Z def test_publish_heroku_plugin_secrets(mock_call, mock_check_output, mock_which): | |
2021-07-11T02:17:19.2013194Z mock_which.return_value = True | |
2021-07-11T02:17:19.2013698Z mock_check_output.side_effect = lambda s: { | |
2021-07-11T02:17:19.2014225Z "['heroku', 'plugins']": b"heroku-builds", | |
2021-07-11T02:17:19.2014713Z "['heroku', 'apps:list', '--json']": b"[]", | |
2021-07-11T02:17:19.2015235Z "['heroku', 'apps:create', 'datasette', '--json']": b'{"name": "f"}', | |
2021-07-11T02:17:19.2015666Z }[repr(s)] | |
2021-07-11T02:17:19.2016026Z runner = CliRunner() | |
2021-07-11T02:17:19.2016504Z with runner.isolated_filesystem(): | |
2021-07-11T02:17:19.2016977Z with open("test.db", "w") as fp: | |
2021-07-11T02:17:19.2017380Z fp.write("data") | |
2021-07-11T02:17:19.2017796Z result = runner.invoke( | |
2021-07-11T02:17:19.2018184Z cli.cli, | |
2021-07-11T02:17:19.2018493Z [ | |
2021-07-11T02:17:19.2018804Z "publish", | |
2021-07-11T02:17:19.2019154Z "heroku", | |
2021-07-11T02:17:19.2019498Z "test.db", | |
2021-07-11T02:17:19.2019882Z "--plugin-secret", | |
2021-07-11T02:17:19.2020387Z "datasette-auth-github", | |
2021-07-11T02:17:19.2020893Z "client_id", | |
2021-07-11T02:17:19.2021253Z "x-client-id", | |
2021-07-11T02:17:19.2021588Z ], | |
2021-07-11T02:17:19.2021871Z ) | |
2021-07-11T02:17:19.2022290Z > assert 0 == result.exit_code, result.output | |
2021-07-11T02:17:19.2022788Z E AssertionError: | |
2021-07-11T02:17:19.2023154Z E assert 0 == 1 | |
2021-07-11T02:17:19.2023863Z E + where 1 = <Result PermissionError(13, 'The process cannot access the file because it is being used by another process')>.exit_code | |
2021-07-11T02:17:19.2024449Z | |
2021-07-11T02:17:19.2024983Z D:\a\datasette\datasette\tests\test_publish_heroku.py:108: AssertionError | |
2021-07-11T02:17:19.2025590Z ____________________________ test_detect_fts["-"] _____________________________ | |
2021-07-11T02:17:19.2025865Z | |
2021-07-11T02:17:19.2026200Z open_quote = '"', close_quote = '"' | |
2021-07-11T02:17:19.2026461Z | |
2021-07-11T02:17:19.2027025Z @pytest.mark.parametrize("open_quote,close_quote", [('"', '"'), ("[", "]")]) | |
2021-07-11T02:17:19.2027681Z def test_detect_fts(open_quote, close_quote): | |
2021-07-11T02:17:19.2028091Z sql = """ | |
2021-07-11T02:17:19.2028436Z CREATE TABLE "Dumb_Table" ( | |
2021-07-11T02:17:19.2028843Z "TreeID" INTEGER, | |
2021-07-11T02:17:19.2029227Z "qSpecies" TEXT | |
2021-07-11T02:17:19.2029540Z ); | |
2021-07-11T02:17:19.2029907Z CREATE TABLE "Street_Tree_List" ( | |
2021-07-11T02:17:19.2030311Z "TreeID" INTEGER, | |
2021-07-11T02:17:19.2030732Z "qSpecies" TEXT, | |
2021-07-11T02:17:19.2031107Z "qAddress" TEXT, | |
2021-07-11T02:17:19.2031484Z "SiteOrder" INTEGER, | |
2021-07-11T02:17:19.2031882Z "qSiteInfo" TEXT, | |
2021-07-11T02:17:19.2032274Z "PlantType" TEXT, | |
2021-07-11T02:17:19.2032648Z "qCaretaker" TEXT | |
2021-07-11T02:17:19.2032982Z ); | |
2021-07-11T02:17:19.2033383Z CREATE VIEW Test_View AS SELECT * FROM Dumb_Table; | |
2021-07-11T02:17:19.2034228Z CREATE VIRTUAL TABLE {open}Street_Tree_List_fts{close} USING FTS4 ("qAddress", "qCaretaker", "qSpecies", content={open}Street_Tree_List{close}); | |
2021-07-11T02:17:19.2035031Z CREATE VIRTUAL TABLE r USING rtree(a, b, c); | |
2021-07-11T02:17:19.2035425Z """.format( | |
2021-07-11T02:17:19.2035836Z open=open_quote, close=close_quote | |
2021-07-11T02:17:19.2036210Z ) | |
2021-07-11T02:17:19.2036639Z conn = utils.sqlite3.connect(":memory:") | |
2021-07-11T02:17:19.2037187Z > conn.executescript(sql) | |
2021-07-11T02:17:19.2037801Z E sqlite3.OperationalError: no such module: rtree | |
2021-07-11T02:17:19.2038209Z | |
2021-07-11T02:17:19.2038715Z D:\a\datasette\datasette\tests\test_utils.py:196: OperationalError | |
2021-07-11T02:17:19.2039372Z ____________________________ test_detect_fts[[-]] _____________________________ | |
2021-07-11T02:17:19.2039645Z | |
2021-07-11T02:17:19.2039968Z open_quote = '[', close_quote = ']' | |
2021-07-11T02:17:19.2040231Z | |
2021-07-11T02:17:19.2040807Z @pytest.mark.parametrize("open_quote,close_quote", [('"', '"'), ("[", "]")]) | |
2021-07-11T02:17:19.2041452Z def test_detect_fts(open_quote, close_quote): | |
2021-07-11T02:17:19.2041861Z sql = """ | |
2021-07-11T02:17:19.2042218Z CREATE TABLE "Dumb_Table" ( | |
2021-07-11T02:17:19.2042607Z "TreeID" INTEGER, | |
2021-07-11T02:17:19.2042991Z "qSpecies" TEXT | |
2021-07-11T02:17:19.2043314Z ); | |
2021-07-11T02:17:19.2043670Z CREATE TABLE "Street_Tree_List" ( | |
2021-07-11T02:17:19.2044089Z "TreeID" INTEGER, | |
2021-07-11T02:17:19.2044473Z "qSpecies" TEXT, | |
2021-07-11T02:17:19.2044832Z "qAddress" TEXT, | |
2021-07-11T02:17:19.2045221Z "SiteOrder" INTEGER, | |
2021-07-11T02:17:19.2045609Z "qSiteInfo" TEXT, | |
2021-07-11T02:17:19.2045993Z "PlantType" TEXT, | |
2021-07-11T02:17:19.2046386Z "qCaretaker" TEXT | |
2021-07-11T02:17:19.2046703Z ); | |
2021-07-11T02:17:19.2047120Z CREATE VIEW Test_View AS SELECT * FROM Dumb_Table; | |
2021-07-11T02:17:19.2047955Z CREATE VIRTUAL TABLE {open}Street_Tree_List_fts{close} USING FTS4 ("qAddress", "qCaretaker", "qSpecies", content={open}Street_Tree_List{close}); | |
2021-07-11T02:17:19.2048740Z CREATE VIRTUAL TABLE r USING rtree(a, b, c); | |
2021-07-11T02:17:19.2049150Z """.format( | |
2021-07-11T02:17:19.2049552Z open=open_quote, close=close_quote | |
2021-07-11T02:17:19.2049919Z ) | |
2021-07-11T02:17:19.2050359Z conn = utils.sqlite3.connect(":memory:") | |
2021-07-11T02:17:19.2050948Z > conn.executescript(sql) | |
2021-07-11T02:17:19.2051552Z E sqlite3.OperationalError: no such module: rtree | |
2021-07-11T02:17:19.2051959Z | |
2021-07-11T02:17:19.2052494Z D:\a\datasette\datasette\tests\test_utils.py:196: OperationalError | |
2021-07-11T02:17:19.2053176Z _______________ test_temporary_docker_directory_uses_hard_link ________________ | |
2021-07-11T02:17:19.2053529Z | |
2021-07-11T02:17:19.2054018Z def test_temporary_docker_directory_uses_hard_link(): | |
2021-07-11T02:17:19.2054685Z with tempfile.TemporaryDirectory() as td: | |
2021-07-11T02:17:19.2055222Z os.chdir(td) | |
2021-07-11T02:17:19.2055603Z with open("hello", "w") as fp: | |
2021-07-11T02:17:19.2055988Z fp.write("world") | |
2021-07-11T02:17:19.2056440Z # Default usage of this should use symlink | |
2021-07-11T02:17:19.2056984Z with utils.temporary_docker_directory( | |
2021-07-11T02:17:19.2057441Z files=["hello"], | |
2021-07-11T02:17:19.2057787Z name="t", | |
2021-07-11T02:17:19.2058143Z metadata=None, | |
2021-07-11T02:17:19.2058531Z extra_options=None, | |
2021-07-11T02:17:19.2058921Z branch=None, | |
2021-07-11T02:17:19.2059308Z template_dir=None, | |
2021-07-11T02:17:19.2059690Z plugins_dir=None, | |
2021-07-11T02:17:19.2060046Z static=[], | |
2021-07-11T02:17:19.2060375Z install=[], | |
2021-07-11T02:17:19.2060802Z spatialite=False, | |
2021-07-11T02:17:19.2061213Z version_note=None, | |
2021-07-11T02:17:19.2061593Z secret="secret", | |
2021-07-11T02:17:19.2061972Z ) as temp_docker: | |
2021-07-11T02:17:19.2062440Z hello = os.path.join(temp_docker, "hello") | |
2021-07-11T02:17:19.2062901Z with open(hello) as fp: | |
2021-07-11T02:17:19.2063326Z assert "world" == fp.read() | |
2021-07-11T02:17:19.2063746Z # It should be a hard link | |
2021-07-11T02:17:19.2064158Z > assert 2 == os.stat(hello).st_nlink | |
2021-07-11T02:17:19.2064433Z | |
2021-07-11T02:17:19.2064861Z D:\a\datasette\datasette\tests\test_utils.py:272: | |
2021-07-11T02:17:19.2065374Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.2065949Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.2066514Z next(self.gen) | |
2021-07-11T02:17:19.2067107Z D:\a\datasette\datasette\datasette\utils\__init__.py:453: in temporary_docker_directory | |
2021-07-11T02:17:19.2067706Z tmp.cleanup() | |
2021-07-11T02:17:19.2068289Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.2068893Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.2069493Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.2070108Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.2070780Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:390: in _rmtree_unsafe | |
2021-07-11T02:17:19.2071413Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.2072042Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:399: in _rmtree_unsafe | |
2021-07-11T02:17:19.2072672Z onerror(os.rmdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.2073109Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.2073345Z | |
2021-07-11T02:17:19.2073802Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpoh4dbaeg\\t' | |
2021-07-11T02:17:19.2074444Z onerror = <function rmtree.<locals>.onerror at 0x000001D1BB674620> | |
2021-07-11T02:17:19.2074804Z | |
2021-07-11T02:17:19.2075161Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.2075549Z try: | |
2021-07-11T02:17:19.2075919Z if os.path.islink(path): | |
2021-07-11T02:17:19.2076444Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.2077044Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.2077524Z except OSError: | |
2021-07-11T02:17:19.2078010Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.2078580Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.2079004Z return | |
2021-07-11T02:17:19.2079305Z names = [] | |
2021-07-11T02:17:19.2079603Z try: | |
2021-07-11T02:17:19.2080009Z names = os.listdir(path) | |
2021-07-11T02:17:19.2080402Z except OSError: | |
2021-07-11T02:17:19.2080917Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.2081355Z for name in names: | |
2021-07-11T02:17:19.2081797Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.2082203Z try: | |
2021-07-11T02:17:19.2082583Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.2083010Z except OSError: | |
2021-07-11T02:17:19.2083431Z mode = 0 | |
2021-07-11T02:17:19.2083950Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.2084445Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.2084943Z else: | |
2021-07-11T02:17:19.2085317Z try: | |
2021-07-11T02:17:19.2085728Z os.unlink(fullname) | |
2021-07-11T02:17:19.2086296Z except OSError: | |
2021-07-11T02:17:19.2112084Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.2112555Z try: | |
2021-07-11T02:17:19.2112895Z > os.rmdir(path) | |
2021-07-11T02:17:19.2113779Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpoh4dbaeg\\t' | |
2021-07-11T02:17:19.2114489Z | |
2021-07-11T02:17:19.2115053Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:397: PermissionError | |
2021-07-11T02:17:19.2115810Z ________ test_temporary_docker_directory_uses_copy_if_hard_link_fails _________ | |
2021-07-11T02:17:19.2116196Z | |
2021-07-11T02:17:19.2116553Z mock_link = <MagicMock name='link' id='2000303536168'> | |
2021-07-11T02:17:19.2116845Z | |
2021-07-11T02:17:19.2117156Z @patch("os.link") | |
2021-07-11T02:17:19.2117682Z def test_temporary_docker_directory_uses_copy_if_hard_link_fails(mock_link): | |
2021-07-11T02:17:19.2118554Z # Copy instead if os.link raises OSError (normally due to different device) | |
2021-07-11T02:17:19.2119162Z mock_link.side_effect = OSError | |
2021-07-11T02:17:19.2119758Z with tempfile.TemporaryDirectory() as td: | |
2021-07-11T02:17:19.2120302Z os.chdir(td) | |
2021-07-11T02:17:19.2120756Z with open("hello", "w") as fp: | |
2021-07-11T02:17:19.2121149Z fp.write("world") | |
2021-07-11T02:17:19.2121609Z # Default usage of this should use symlink | |
2021-07-11T02:17:19.2122160Z with utils.temporary_docker_directory( | |
2021-07-11T02:17:19.2122620Z files=["hello"], | |
2021-07-11T02:17:19.2122966Z name="t", | |
2021-07-11T02:17:19.2123311Z metadata=None, | |
2021-07-11T02:17:19.2123716Z extra_options=None, | |
2021-07-11T02:17:19.2124108Z branch=None, | |
2021-07-11T02:17:19.2124481Z template_dir=None, | |
2021-07-11T02:17:19.2124883Z plugins_dir=None, | |
2021-07-11T02:17:19.2125241Z static=[], | |
2021-07-11T02:17:19.2125567Z install=[], | |
2021-07-11T02:17:19.2125954Z spatialite=False, | |
2021-07-11T02:17:19.2126361Z version_note=None, | |
2021-07-11T02:17:19.2126728Z secret=None, | |
2021-07-11T02:17:19.2127099Z ) as temp_docker: | |
2021-07-11T02:17:19.2127551Z hello = os.path.join(temp_docker, "hello") | |
2021-07-11T02:17:19.2128030Z with open(hello) as fp: | |
2021-07-11T02:17:19.2128452Z assert "world" == fp.read() | |
2021-07-11T02:17:19.2128891Z # It should be a copy, not a hard link | |
2021-07-11T02:17:19.2129347Z > assert 1 == os.stat(hello).st_nlink | |
2021-07-11T02:17:19.2129627Z | |
2021-07-11T02:17:19.2130054Z D:\a\datasette\datasette\tests\test_utils.py:302: | |
2021-07-11T02:17:19.2130520Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.2131149Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.2131786Z next(self.gen) | |
2021-07-11T02:17:19.2132382Z D:\a\datasette\datasette\datasette\utils\__init__.py:453: in temporary_docker_directory | |
2021-07-11T02:17:19.2132986Z tmp.cleanup() | |
2021-07-11T02:17:19.2133555Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.2134170Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.2134774Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.2135376Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.2136023Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:390: in _rmtree_unsafe | |
2021-07-11T02:17:19.2136652Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.2137273Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:399: in _rmtree_unsafe | |
2021-07-11T02:17:19.2137912Z onerror(os.rmdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.2138346Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.2138581Z | |
2021-07-11T02:17:19.2139038Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmppl19pws6\\t' | |
2021-07-11T02:17:19.2139697Z onerror = <function rmtree.<locals>.onerror at 0x000001D1BB6CEF28> | |
2021-07-11T02:17:19.2140070Z | |
2021-07-11T02:17:19.2140425Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.2141039Z try: | |
2021-07-11T02:17:19.2141424Z if os.path.islink(path): | |
2021-07-11T02:17:19.2141955Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.2142568Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.2143059Z except OSError: | |
2021-07-11T02:17:19.2143548Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.2144126Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.2144626Z return | |
2021-07-11T02:17:19.2144946Z names = [] | |
2021-07-11T02:17:19.2145248Z try: | |
2021-07-11T02:17:19.2145598Z names = os.listdir(path) | |
2021-07-11T02:17:19.2146002Z except OSError: | |
2021-07-11T02:17:19.2146472Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.2146913Z for name in names: | |
2021-07-11T02:17:19.2147355Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.2147752Z try: | |
2021-07-11T02:17:19.2148126Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.2148551Z except OSError: | |
2021-07-11T02:17:19.2148896Z mode = 0 | |
2021-07-11T02:17:19.2149255Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.2149712Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.2150105Z else: | |
2021-07-11T02:17:19.2150419Z try: | |
2021-07-11T02:17:19.2150835Z os.unlink(fullname) | |
2021-07-11T02:17:19.2151241Z except OSError: | |
2021-07-11T02:17:19.2151734Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.2152165Z try: | |
2021-07-11T02:17:19.2152501Z > os.rmdir(path) | |
2021-07-11T02:17:19.2153376Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmppl19pws6\\t' | |
2021-07-11T02:17:19.2154095Z | |
2021-07-11T02:17:19.2154651Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:397: PermissionError | |
2021-07-11T02:17:19.2155355Z _________________ test_temporary_docker_directory_quotes_args _________________ | |
2021-07-11T02:17:19.2155708Z | |
2021-07-11T02:17:19.2156136Z def test_temporary_docker_directory_quotes_args(): | |
2021-07-11T02:17:19.2156794Z with tempfile.TemporaryDirectory() as td: | |
2021-07-11T02:17:19.2157337Z os.chdir(td) | |
2021-07-11T02:17:19.2157721Z with open("hello", "w") as fp: | |
2021-07-11T02:17:19.2158112Z fp.write("world") | |
2021-07-11T02:17:19.2158599Z with utils.temporary_docker_directory( | |
2021-07-11T02:17:19.2159150Z files=["hello"], | |
2021-07-11T02:17:19.2159487Z name="t", | |
2021-07-11T02:17:19.2159842Z metadata=None, | |
2021-07-11T02:17:19.2160250Z extra_options="--$HOME", | |
2021-07-11T02:17:19.2160678Z branch=None, | |
2021-07-11T02:17:19.2161068Z template_dir=None, | |
2021-07-11T02:17:19.2161456Z plugins_dir=None, | |
2021-07-11T02:17:19.2161815Z static=[], | |
2021-07-11T02:17:19.2162150Z install=[], | |
2021-07-11T02:17:19.2162519Z spatialite=False, | |
2021-07-11T02:17:19.2162926Z version_note="$PWD", | |
2021-07-11T02:17:19.2163321Z secret="secret", | |
2021-07-11T02:17:19.2163681Z ) as temp_docker: | |
2021-07-11T02:17:19.2164164Z df = os.path.join(temp_docker, "Dockerfile") | |
2021-07-11T02:17:19.2164656Z with open(df) as fp: | |
2021-07-11T02:17:19.2165050Z df_contents = fp.read() | |
2021-07-11T02:17:19.2165492Z assert "'$PWD'" in df_contents | |
2021-07-11T02:17:19.2165931Z assert "'--$HOME'" in df_contents | |
2021-07-11T02:17:19.2166453Z > assert "ENV DATASETTE_SECRET 'secret'" in df_contents | |
2021-07-11T02:17:19.2166806Z | |
2021-07-11T02:17:19.2167232Z D:\a\datasette\datasette\tests\test_utils.py:329: | |
2021-07-11T02:17:19.2167701Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.2168284Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\contextlib.py:88: in __exit__ | |
2021-07-11T02:17:19.2168852Z next(self.gen) | |
2021-07-11T02:17:19.2169440Z D:\a\datasette\datasette\datasette\utils\__init__.py:453: in temporary_docker_directory | |
2021-07-11T02:17:19.2170041Z tmp.cleanup() | |
2021-07-11T02:17:19.2170724Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\tempfile.py:813: in cleanup | |
2021-07-11T02:17:19.2171335Z _shutil.rmtree(self.name) | |
2021-07-11T02:17:19.2171947Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:500: in rmtree | |
2021-07-11T02:17:19.2172558Z return _rmtree_unsafe(path, onerror) | |
2021-07-11T02:17:19.2173183Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:390: in _rmtree_unsafe | |
2021-07-11T02:17:19.2173812Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.2174432Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:399: in _rmtree_unsafe | |
2021-07-11T02:17:19.2175071Z onerror(os.rmdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.2175506Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
2021-07-11T02:17:19.2175744Z | |
2021-07-11T02:17:19.2176196Z path = 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpnsbx4xk5\\t' | |
2021-07-11T02:17:19.2176852Z onerror = <function rmtree.<locals>.onerror at 0x000001D1BB72E048> | |
2021-07-11T02:17:19.2177224Z | |
2021-07-11T02:17:19.2177583Z def _rmtree_unsafe(path, onerror): | |
2021-07-11T02:17:19.2177961Z try: | |
2021-07-11T02:17:19.2178336Z if os.path.islink(path): | |
2021-07-11T02:17:19.2178870Z # symlinks to directories are forbidden, see bug #1669 | |
2021-07-11T02:17:19.2179471Z raise OSError("Cannot call rmtree on a symbolic link") | |
2021-07-11T02:17:19.2179955Z except OSError: | |
2021-07-11T02:17:19.2180439Z onerror(os.path.islink, path, sys.exc_info()) | |
2021-07-11T02:17:19.2181058Z # can't continue even if onerror hook returns | |
2021-07-11T02:17:19.2181481Z return | |
2021-07-11T02:17:19.2181781Z names = [] | |
2021-07-11T02:17:19.2182079Z try: | |
2021-07-11T02:17:19.2182425Z names = os.listdir(path) | |
2021-07-11T02:17:19.2182827Z except OSError: | |
2021-07-11T02:17:19.2183291Z onerror(os.listdir, path, sys.exc_info()) | |
2021-07-11T02:17:19.2183726Z for name in names: | |
2021-07-11T02:17:19.2184170Z fullname = os.path.join(path, name) | |
2021-07-11T02:17:19.2184570Z try: | |
2021-07-11T02:17:19.2185627Z mode = os.lstat(fullname).st_mode | |
2021-07-11T02:17:19.2186084Z except OSError: | |
2021-07-11T02:17:19.2186439Z mode = 0 | |
2021-07-11T02:17:19.2186792Z if stat.S_ISDIR(mode): | |
2021-07-11T02:17:19.2187251Z _rmtree_unsafe(fullname, onerror) | |
2021-07-11T02:17:19.2187663Z else: | |
2021-07-11T02:17:19.2187958Z try: | |
2021-07-11T02:17:19.2188325Z os.unlink(fullname) | |
2021-07-11T02:17:19.2188722Z except OSError: | |
2021-07-11T02:17:19.2189215Z onerror(os.unlink, fullname, sys.exc_info()) | |
2021-07-11T02:17:19.2189647Z try: | |
2021-07-11T02:17:19.2189956Z > os.rmdir(path) | |
2021-07-11T02:17:19.2190890Z E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpnsbx4xk5\\t' | |
2021-07-11T02:17:19.2191611Z | |
2021-07-11T02:17:19.2192175Z c:\hostedtoolcache\windows\python\3.6.8\x64\lib\shutil.py:397: PermissionError | |
2021-07-11T02:17:19.2192816Z =========================== short test summary info =========================== | |
2021-07-11T02:17:19.2194172Z FAILED tests/test_package.py::test_package_with_port - AssertionError: assert... | |
2021-07-11T02:17:19.2194999Z FAILED tests/test_package.py::test_package - AssertionError: assert 0 == 1 | |
2021-07-11T02:17:19.2195744Z FAILED tests/test_cli_serve_get.py::test_serve_with_get - AssertionError: | |
2021-07-11T02:17:19.2196676Z FAILED tests/test_api.py::test_searchable[/fixtures/searchable.json?_search=te*+AND+do*&_searchmode=raw-expected_rows3] | |
2021-07-11T02:17:19.2197665Z FAILED tests/test_api.py::test_searchmode[table_metadata0-_search=te*+AND+do*-expected_rows0] | |
2021-07-11T02:17:19.2198525Z FAILED tests/test_api.py::test_searchmode[table_metadata1-_search=te*+AND+do*-expected_rows1] | |
2021-07-11T02:17:19.2199550Z FAILED tests/test_api.py::test_searchmode[table_metadata2-_search=te*+AND+do*&_searchmode=raw-expected_rows2] | |
2021-07-11T02:17:19.2200661Z FAILED tests/test_api.py::test_searchmode[table_metadata3-_search=te*+AND+do*&_searchmode=escaped-expected_rows3] | |
2021-07-11T02:17:19.2201566Z FAILED tests/test_api.py::test_table_filter_extra_where_disabled_if_no_sql_allowed | |
2021-07-11T02:17:19.2202338Z FAILED tests/test_api.py::test_allow_facet_off - PermissionError: [WinError 3... | |
2021-07-11T02:17:19.2203131Z FAILED tests/test_api.py::test_suggest_facets_off - PermissionError: [WinErro... | |
2021-07-11T02:17:19.2203921Z FAILED tests/test_api.py::test_config_force_https_urls - PermissionError: [Wi... | |
2021-07-11T02:17:19.2204697Z FAILED tests/test_api.py::test_trace[True] - PermissionError: [WinError 32] T... | |
2021-07-11T02:17:19.2205467Z FAILED tests/test_api.py::test_trace[False] - PermissionError: [WinError 32] ... | |
2021-07-11T02:17:19.2206252Z FAILED tests/test_cli.py::test_serve_with_inspect_file_prepopulates_table_counts_cache | |
2021-07-11T02:17:19.2207148Z FAILED tests/test_cli.py::test_spatialite_error_if_attempt_to_open_spatialite[spatialite_paths1-True] | |
2021-07-11T02:17:19.2208016Z FAILED tests/test_config_dir.py::test_static - AssertionError: assert '\nbody... | |
2021-07-11T02:17:19.2208743Z FAILED tests/test_custom_pages.py::test_custom_pages_view_name - assert 200 =... | |
2021-07-11T02:17:19.2209453Z FAILED tests/test_custom_pages.py::test_request_is_available - assert 200 == 404 | |
2021-07-11T02:17:19.2210166Z FAILED tests/test_custom_pages.py::test_custom_pages_with_base_url - assert 2... | |
2021-07-11T02:17:19.2210911Z FAILED tests/test_custom_pages.py::test_custom_pages_nested - assert 200 == 404 | |
2021-07-11T02:17:19.2211593Z FAILED tests/test_custom_pages.py::test_custom_status - assert 202 == 404 | |
2021-07-11T02:17:19.2212262Z FAILED tests/test_custom_pages.py::test_custom_headers - assert 200 == 404 | |
2021-07-11T02:17:19.2212931Z FAILED tests/test_custom_pages.py::test_custom_content_type - assert 200 == 404 | |
2021-07-11T02:17:19.2213605Z FAILED tests/test_custom_pages.py::test_redirect - assert 302 == 404 | |
2021-07-11T02:17:19.2214321Z FAILED tests/test_custom_pages.py::test_redirect2 - assert 301 == 404 | |
2021-07-11T02:17:19.2215017Z FAILED tests/test_facets.py::test_json_array_with_blanks_and_nulls - Assertio... | |
2021-07-11T02:17:19.2215861Z FAILED tests/test_filters.py::test_build_where[args14-expected_where14-expected_params14] | |
2021-07-11T02:17:19.2216736Z FAILED tests/test_html.py::test_static_mounts - PermissionError: [WinError 32... | |
2021-07-11T02:17:19.2217513Z FAILED tests/test_html.py::test_memory_database_page - PermissionError: [WinE... | |
2021-07-11T02:17:19.2218317Z FAILED tests/test_html.py::test_not_allowed_methods - PermissionError: [WinEr... | |
2021-07-11T02:17:19.2219124Z FAILED tests/test_html.py::test_table_cell_truncation - PermissionError: [Win... | |
2021-07-11T02:17:19.2219908Z FAILED tests/test_html.py::test_row_page_does_not_truncate - PermissionError:... | |
2021-07-11T02:17:19.2222653Z FAILED tests/test_html.py::test_database_download_for_immutable - PermissionE... | |
2021-07-11T02:17:19.2223505Z FAILED tests/test_html.py::test_database_download_disallowed_for_memory - Per... | |
2021-07-11T02:17:19.2224277Z FAILED tests/test_html.py::test_allow_download_off - PermissionError: [WinErr... | |
2021-07-11T02:17:19.2225055Z FAILED tests/test_html.py::test_allow_sql_off - PermissionError: [WinError 32... | |
2021-07-11T02:17:19.2225839Z FAILED tests/test_html.py::test_custom_table_include - PermissionError: [WinE... | |
2021-07-11T02:17:19.2226616Z FAILED tests/test_html.py::test_config_template_debug_on - PermissionError: [... | |
2021-07-11T02:17:19.2227382Z FAILED tests/test_html.py::test_debug_context_includes_extra_template_vars - ... | |
2021-07-11T02:17:19.2228136Z FAILED tests/test_html.py::test_edit_sql_link_not_shown_if_user_lacks_permission[True] | |
2021-07-11T02:17:19.2228891Z FAILED tests/test_html.py::test_edit_sql_link_not_shown_if_user_lacks_permission[False] | |
2021-07-11T02:17:19.2230111Z FAILED tests/test_html.py::test_facet_more_links[5-/fixtures/facetable?_facet=neighborhood-2-True-/fixtures/facetable?_facet=neighborhood&_facet_size=max] | |
2021-07-11T02:17:19.2231546Z FAILED tests/test_html.py::test_facet_more_links[5-/fixtures/facetable?_facet=neighborhood&_facet_size=50-5-True-/fixtures/facetable?_facet=neighborhood&_facet_size=max] | |
2021-07-11T02:17:19.2232756Z FAILED tests/test_html.py::test_facet_more_links[20-/fixtures/facetable?_facet=neighborhood&_facet_size=max-14-False-None] | |
2021-07-11T02:17:19.2233815Z FAILED tests/test_html.py::test_facet_more_links[5-/fixtures/facetable?_facet=neighborhood&_facet_size=max-5-True-None] | |
2021-07-11T02:17:19.2234755Z FAILED tests/test_html.py::test_unavailable_table_does_not_break_sort_relationships | |
2021-07-11T02:17:19.2235584Z FAILED tests/test_permissions.py::test_view_database[None-200-200] - Permissi... | |
2021-07-11T02:17:19.2236393Z FAILED tests/test_permissions.py::test_view_database[allow1-403-403] - Permis... | |
2021-07-11T02:17:19.2237207Z FAILED tests/test_permissions.py::test_view_database[allow2-403-200] - Permis... | |
2021-07-11T02:17:19.2238016Z FAILED tests/test_permissions.py::test_database_list_respects_view_database | |
2021-07-11T02:17:19.2238795Z FAILED tests/test_permissions.py::test_database_list_respects_view_table - Pe... | |
2021-07-11T02:17:19.2239608Z FAILED tests/test_permissions.py::test_view_table[None-200-200] - PermissionE... | |
2021-07-11T02:17:19.2240432Z FAILED tests/test_permissions.py::test_view_table[allow1-403-403] - Permissio... | |
2021-07-11T02:17:19.2241283Z FAILED tests/test_permissions.py::test_view_table[allow2-403-200] - Permissio... | |
2021-07-11T02:17:19.2242093Z FAILED tests/test_permissions.py::test_table_list_respects_view_table - Permi... | |
2021-07-11T02:17:19.2242901Z FAILED tests/test_permissions.py::test_view_query[None-200-200] - PermissionE... | |
2021-07-11T02:17:19.2243712Z FAILED tests/test_permissions.py::test_view_query[allow1-403-403] - Permissio... | |
2021-07-11T02:17:19.2244529Z FAILED tests/test_permissions.py::test_view_query[allow2-403-200] - Permissio... | |
2021-07-11T02:17:19.2245372Z FAILED tests/test_permissions.py::test_execute_sql[metadata0] - PermissionErr... | |
2021-07-11T02:17:19.2246300Z FAILED tests/test_permissions.py::test_execute_sql[metadata1] - PermissionErr... | |
2021-07-11T02:17:19.2247140Z FAILED tests/test_permissions.py::test_query_list_respects_view_query - Permi... | |
2021-07-11T02:17:19.2247962Z FAILED tests/test_permissions.py::test_allow_unauthenticated[allow0-403] - Pe... | |
2021-07-11T02:17:19.2248791Z FAILED tests/test_permissions.py::test_allow_unauthenticated[allow1-200] - Pe... | |
2021-07-11T02:17:19.2249626Z FAILED tests/test_plugins.py::test_hook_extra_template_vars - PermissionError... | |
2021-07-11T02:17:19.2250451Z FAILED tests/test_plugins.py::test_plugins_async_template_function - Permissi... | |
2021-07-11T02:17:19.2251289Z FAILED tests/test_plugins.py::test_hook_register_routes_csrftoken - Permissio... | |
2021-07-11T02:17:19.2252078Z FAILED tests/test_plugins.py::test_hook_register_routes_render_message - Perm... | |
2021-07-11T02:17:19.2252904Z FAILED tests/test_plugins.py::test_hook_register_magic_parameters - Permissio... | |
2021-07-11T02:17:19.2253717Z FAILED tests/test_plugins.py::test_hook_forbidden - PermissionError: [WinErro... | |
2021-07-11T02:17:19.2254526Z FAILED tests/test_publish_cloudrun.py::test_publish_cloudrun_prompts_for_service | |
2021-07-11T02:17:19.2255348Z FAILED tests/test_publish_cloudrun.py::test_publish_cloudrun - AssertionError... | |
2021-07-11T02:17:19.2256144Z FAILED tests/test_publish_cloudrun.py::test_publish_cloudrun_memory[1Gi-False] | |
2021-07-11T02:17:19.2256918Z FAILED tests/test_publish_cloudrun.py::test_publish_cloudrun_memory[2G-False] | |
2021-07-11T02:17:19.2257690Z FAILED tests/test_publish_cloudrun.py::test_publish_cloudrun_memory[256Mi-False] | |
2021-07-11T02:17:19.2258441Z FAILED tests/test_publish_cloudrun.py::test_publish_cloudrun_plugin_secrets | |
2021-07-11T02:17:19.2259199Z FAILED tests/test_publish_cloudrun.py::test_publish_cloudrun_apt_get_install | |
2021-07-11T02:17:19.2260094Z FAILED tests/test_publish_cloudrun.py::test_publish_cloudrun_extra_options[---setting force_https_urls on] | |
2021-07-11T02:17:19.2261199Z FAILED tests/test_publish_cloudrun.py::test_publish_cloudrun_extra_options[--setting base_url /foo---setting base_url /foo --setting force_https_urls on] | |
2021-07-11T02:17:19.2262363Z FAILED tests/test_publish_cloudrun.py::test_publish_cloudrun_extra_options[--setting force_https_urls off---setting force_https_urls off] | |
2021-07-11T02:17:19.2263316Z FAILED tests/test_publish_heroku.py::test_publish_heroku - AssertionError: | |
2021-07-11T02:17:19.2264100Z FAILED tests/test_publish_heroku.py::test_publish_heroku_plugin_secrets - Ass... | |
2021-07-11T02:17:19.2264920Z FAILED tests/test_utils.py::test_detect_fts["-"] - sqlite3.OperationalError: ... | |
2021-07-11T02:17:19.2265789Z FAILED tests/test_utils.py::test_detect_fts[[-]] - sqlite3.OperationalError: ... | |
2021-07-11T02:17:19.2266592Z FAILED tests/test_utils.py::test_temporary_docker_directory_uses_hard_link - ... | |
2021-07-11T02:17:19.2267356Z FAILED tests/test_utils.py::test_temporary_docker_directory_uses_copy_if_hard_link_fails | |
2021-07-11T02:17:19.2268142Z FAILED tests/test_utils.py::test_temporary_docker_directory_quotes_args - Per... | |
2021-07-11T02:17:19.2268934Z ERROR tests/test_canned_queries.py::test_insert - PermissionError: [WinError ... | |
2021-07-11T02:17:19.2269763Z ERROR tests/test_canned_queries.py::test_canned_query_form_csrf_hidden_field[canned_read-False] | |
2021-07-11T02:17:19.2270684Z ERROR tests/test_canned_queries.py::test_canned_query_form_csrf_hidden_field[add_name_specify_id-True] | |
2021-07-11T02:17:19.2271553Z ERROR tests/test_canned_queries.py::test_canned_query_form_csrf_hidden_field[add_name-True] | |
2021-07-11T02:17:19.2272331Z ERROR tests/test_canned_queries.py::test_insert_with_cookies_requires_csrf - ... | |
2021-07-11T02:17:19.2273092Z ERROR tests/test_canned_queries.py::test_insert_no_cookies_no_csrf - Permissi... | |
2021-07-11T02:17:19.2273883Z ERROR tests/test_canned_queries.py::test_custom_success_message - PermissionE... | |
2021-07-11T02:17:19.2274703Z ERROR tests/test_canned_queries.py::test_insert_error - PermissionError: [Win... | |
2021-07-11T02:17:19.2275559Z ERROR tests/test_canned_queries.py::test_custom_params - PermissionError: [Wi... | |
2021-07-11T02:17:19.2276375Z ERROR tests/test_canned_queries.py::test_vary_header - PermissionError: [WinE... | |
2021-07-11T02:17:19.2277181Z ERROR tests/test_canned_queries.py::test_json_post_body - PermissionError: [W... | |
2021-07-11T02:17:19.2278002Z ERROR tests/test_canned_queries.py::test_json_response[None-name=NameGoesHere-?_json=1] | |
2021-07-11T02:17:19.2278921Z ERROR tests/test_canned_queries.py::test_json_response[headers1-name=NameGoesHere-None] | |
2021-07-11T02:17:19.2279855Z ERROR tests/test_canned_queries.py::test_json_response[None-name=NameGoesHere&_json=1-None] | |
2021-07-11T02:17:19.2280789Z ERROR tests/test_canned_queries.py::test_json_response[None-{"name": "NameGoesHere", "_json": 1}-None] | |
2021-07-11T02:17:19.2281647Z ERROR tests/test_canned_queries.py::test_canned_query_permissions_on_database_page | |
2021-07-11T02:17:19.2282467Z ERROR tests/test_canned_queries.py::test_canned_query_permissions - Permissio... | |
2021-07-11T02:17:19.2283268Z ERROR tests/test_docs.py::test_view_classes_are_documented[AllowDebugView] - ... | |
2021-07-11T02:17:19.2284062Z ERROR tests/test_docs.py::test_view_classes_are_documented[AuthTokenView] - U... | |
2021-07-11T02:17:19.2284835Z ERROR tests/test_docs.py::test_view_classes_are_documented[DatabaseView] - Un... | |
2021-07-11T02:17:19.2285586Z ERROR tests/test_docs.py::test_view_classes_are_documented[IndexView] - Unico... | |
2021-07-11T02:17:19.2286364Z ERROR tests/test_docs.py::test_view_classes_are_documented[JsonDataView] - Un... | |
2021-07-11T02:17:19.2287139Z ERROR tests/test_docs.py::test_view_classes_are_documented[LogoutView] - Unic... | |
2021-07-11T02:17:19.2287921Z ERROR tests/test_docs.py::test_view_classes_are_documented[MessagesDebugView] | |
2021-07-11T02:17:19.2288799Z ERROR tests/test_docs.py::test_view_classes_are_documented[PatternPortfolioView] | |
2021-07-11T02:17:19.2289762Z ERROR tests/test_docs.py::test_view_classes_are_documented[PermissionsDebugView] | |
2021-07-11T02:17:19.2290636Z ERROR tests/test_docs.py::test_view_classes_are_documented[RowView] - Unicode... | |
2021-07-11T02:17:19.2291397Z ERROR tests/test_docs.py::test_view_classes_are_documented[TableView] - Unico... | |
2021-07-11T02:17:19.2292147Z ERROR tests/test_utils.py::test_initial_path_for_datasette[dbs2-/] - Permissi... | |
2021-07-11T02:17:19.2292808Z ====== 87 failed, 819 passed, 7 skipped, 29 errors in 2584.85s (0:43:04) ====== | |
2021-07-11T02:17:24.6209716Z ##[error]Process completed with exit code 1. | |
2021-07-11T02:17:25.1734466Z Post job cleanup. | |
2021-07-11T02:17:26.8987191Z [command]"C:\Program Files\Git\bin\git.exe" version | |
2021-07-11T02:17:26.9169248Z git version 2.32.0.windows.1 | |
2021-07-11T02:17:26.9231518Z [command]"C:\Program Files\Git\bin\git.exe" config --local --name-only --get-regexp core\.sshCommand | |
2021-07-11T02:17:26.9453861Z [command]"C:\Program Files\Git\bin\git.exe" submodule foreach --recursive "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" | |
2021-07-11T02:17:27.3665322Z [command]"C:\Program Files\Git\bin\git.exe" config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader | |
2021-07-11T02:17:27.3833217Z http.https://github.com/.extraheader | |
2021-07-11T02:17:27.3878577Z [command]"C:\Program Files\Git\bin\git.exe" config --local --unset-all http.https://github.com/.extraheader | |
2021-07-11T02:17:27.4091367Z [command]"C:\Program Files\Git\bin\git.exe" submodule foreach --recursive "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" | |
2021-07-11T02:17:27.8346920Z Cleaning up orphan processes | |
2021-07-11T02:17:27.8732458Z Terminate orphan process: pid (6880) (python) | |
2021-07-11T02:17:27.8892486Z Terminate orphan process: pid (1856) (python) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment