kopia lustrzana https://github.com/simonw/datasette
				
				
				
			Get tests to pass on SQLite 3.25
							rodzic
							
								
									0255ec03f7
								
							
						
					
					
						commit
						6b0cc191de
					
				|  | @ -516,14 +516,22 @@ async def test_database_page(ds_client): | |||
|             "private": False, | ||||
|         }, | ||||
|         { | ||||
|             "columns": [ | ||||
|                 "text1", | ||||
|                 "text2", | ||||
|                 "name with . and spaces", | ||||
|                 "searchable_fts", | ||||
|                 "docid", | ||||
|                 "__langid", | ||||
|             ], | ||||
|             "columns": Either( | ||||
|                 [ | ||||
|                     "text1", | ||||
|                     "text2", | ||||
|                     "name with . and spaces", | ||||
|                     "searchable_fts", | ||||
|                     "docid", | ||||
|                     "__langid", | ||||
|                 ], | ||||
|                 # Get tests to pass on SQLite 3.25 as well | ||||
|                 [ | ||||
|                     "text1", | ||||
|                     "text2", | ||||
|                     "name with . and spaces", | ||||
|                 ], | ||||
|             ), | ||||
|             "count": 2, | ||||
|             "foreign_keys": {"incoming": [], "outgoing": []}, | ||||
|             "fts_table": "searchable_fts", | ||||
|  | @ -1192,3 +1200,12 @@ async def test_upgrade_metadata(metadata, expected_config, expected_metadata): | |||
|     assert response.json() == expected_config | ||||
|     response2 = await ds.client.get("/-/metadata.json") | ||||
|     assert response2.json() == expected_metadata | ||||
| 
 | ||||
| 
 | ||||
| class Either: | ||||
|     def __init__(self, a, b): | ||||
|         self.a = a | ||||
|         self.b = b | ||||
| 
 | ||||
|     def __eq__(self, other): | ||||
|         return other == self.a or other == self.b | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Simon Willison
						Simon Willison