kopia lustrzana https://github.com/simonw/datasette
				
				
				
			Upgrade to Python 3.11 on Heroku, refs #1905
							rodzic
							
								
									72ac9bf82f
								
							
						
					
					
						commit
						733447d7c7
					
				|  | @ -194,7 +194,7 @@ def temporary_heroku_directory( | |||
|                 fp.write(json.dumps(metadata_content, indent=2)) | ||||
| 
 | ||||
|         with open("runtime.txt", "w") as fp: | ||||
|             fp.write("python-3.8.10") | ||||
|             fp.write("python-3.11.0") | ||||
| 
 | ||||
|         if branch: | ||||
|             install = [ | ||||
|  |  | |||
|  | @ -133,8 +133,15 @@ def test_publish_heroku_plugin_secrets( | |||
| 
 | ||||
| @pytest.mark.serial | ||||
| @mock.patch("shutil.which") | ||||
| def test_publish_heroku_generate_dir(mock_which, tmp_path_factory): | ||||
| @mock.patch("datasette.publish.heroku.check_output") | ||||
| @mock.patch("datasette.publish.heroku.call") | ||||
| def test_publish_heroku_generate_dir( | ||||
|     mock_call, mock_check_output, mock_which, tmp_path_factory | ||||
| ): | ||||
|     mock_which.return_value = True | ||||
|     mock_check_output.side_effect = lambda s: { | ||||
|         "['heroku', 'plugins']": b"heroku-builds", | ||||
|     }[repr(s)] | ||||
|     runner = CliRunner() | ||||
|     os.chdir(tmp_path_factory.mktemp("runner")) | ||||
|     with open("test.db", "w") as fp: | ||||
|  | @ -163,7 +170,7 @@ def test_publish_heroku_generate_dir(mock_which, tmp_path_factory): | |||
|     } | ||||
|     for name, expected in ( | ||||
|         ("requirements.txt", "datasette"), | ||||
|         ("runtime.txt", "python-3.8.10"), | ||||
|         ("runtime.txt", "python-3.11.0"), | ||||
|         ( | ||||
|             "Procfile", | ||||
|             ( | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Simon Willison
						Simon Willison