mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[2.2.x] Refs #30111 -- Fixed test cleanup in postgres_tests/test_integration.py.
Fixed "ERROR: Step ‘Publish JUnit test result report’ failed: No test report
files were found. Configuration error?" on Jenkins because report files were
put in tests/postgres_tests.
Backport of 2de7eb6f4d from master.
			
			
This commit is contained in:
		| @@ -2,11 +2,13 @@ import os | |||||||
| import subprocess | import subprocess | ||||||
| import sys | import sys | ||||||
|  |  | ||||||
| from tests.postgres_tests import PostgreSQLSimpleTestCase | from . import PostgreSQLSimpleTestCase | ||||||
|  |  | ||||||
|  |  | ||||||
| class PostgresIntegrationTests(PostgreSQLSimpleTestCase): | class PostgresIntegrationTests(PostgreSQLSimpleTestCase): | ||||||
|     def test_check(self): |     def test_check(self): | ||||||
|  |         old_cwd = os.getcwd() | ||||||
|  |         self.addCleanup(lambda: os.chdir(old_cwd)) | ||||||
|         os.chdir(os.path.dirname(__file__)) |         os.chdir(os.path.dirname(__file__)) | ||||||
|         result = subprocess.run( |         result = subprocess.run( | ||||||
|             [sys.executable, '-m', 'django', 'check', '--settings', 'integration_settings'], |             [sys.executable, '-m', 'django', 'check', '--settings', 'integration_settings'], | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user