mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Enables Python 3.11 testing
This commit is contained in:
		
							
								
								
									
										2
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -105,7 +105,7 @@ jobs: | ||||
|       - pre-commit | ||||
|     strategy: | ||||
|       matrix: | ||||
|         python-version: ['3.8', '3.9', '3.10'] | ||||
|         python-version: ['3.8', '3.9', '3.10', '3.11'] | ||||
|       fail-fast: false | ||||
|     steps: | ||||
|       - | ||||
|   | ||||
| @@ -255,7 +255,7 @@ supported. | ||||
|  | ||||
| 1.  Install dependencies. Paperless requires the following packages. | ||||
|  | ||||
|     - `python3` 3.8, 3.9 | ||||
|     - `python3` - 3.8 - 3.11 are supported | ||||
|     - `python3-pip` | ||||
|     - `python3-dev` | ||||
|     - `default-libmysqlclient-dev` for MariaDB | ||||
|   | ||||
| @@ -1,4 +1,5 @@ | ||||
| import hashlib | ||||
| import importlib | ||||
| import os | ||||
| import shutil | ||||
| from pathlib import Path | ||||
| @@ -15,6 +16,10 @@ from documents.tests.utils import TestMigrations | ||||
|  | ||||
| STORAGE_TYPE_GPG = "gpg" | ||||
|  | ||||
| migration_1012_obj = importlib.import_module( | ||||
|     "documents.migrations.1012_fix_archive_files", | ||||
| ) | ||||
|  | ||||
|  | ||||
| def archive_name_from_filename(filename): | ||||
|     return os.path.splitext(filename)[0] + ".pdf" | ||||
| @@ -331,7 +336,7 @@ class TestMigrateArchiveFilesErrors(DirectoriesMixin, TestMigrations): | ||||
|             self.performMigration, | ||||
|         ) | ||||
|  | ||||
|     @mock.patch("documents.migrations.1012_fix_archive_files.parse_wrapper") | ||||
|     @mock.patch(f"{__name__}.migration_1012_obj.parse_wrapper") | ||||
|     def test_parser_error(self, m): | ||||
|         m.side_effect = ParseError() | ||||
|         Document = self.apps.get_model("documents", "Document") | ||||
| @@ -396,7 +401,7 @@ class TestMigrateArchiveFilesErrors(DirectoriesMixin, TestMigrations): | ||||
|         self.assertIsNone(doc1.archive_filename) | ||||
|         self.assertIsNone(doc2.archive_filename) | ||||
|  | ||||
|     @mock.patch("documents.migrations.1012_fix_archive_files.parse_wrapper") | ||||
|     @mock.patch(f"{__name__}.migration_1012_obj.parse_wrapper") | ||||
|     def test_parser_no_archive(self, m): | ||||
|         m.side_effect = fake_parse_wrapper | ||||
|  | ||||
|   | ||||
| @@ -7,7 +7,7 @@ max-line-length = 88 | ||||
|  | ||||
| [tool:pytest] | ||||
| DJANGO_SETTINGS_MODULE=paperless.settings | ||||
| addopts = --pythonwarnings=all --cov --cov-report=html --cov-report=xml --numprocesses auto --quiet | ||||
| addopts = --pythonwarnings=all --cov --cov-report=html --cov-report=xml --numprocesses auto --quiet --durations=50 | ||||
| env = | ||||
|   PAPERLESS_DISABLE_DBHANDLER=true | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Trenton H
					Trenton H