File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 11import os
22import sys
3- from django import VERSION
3+ import django
44from django .db import connection
55import typing as t
66from django .test import TestCase
@@ -44,11 +44,14 @@ def test(self):
4444 f"{ expected_python } "
4545 )
4646
47- expected_django = tuple (int (v ) for v in expected_django .split ("." ) if v )
48- assert VERSION [: len (expected_django )] == expected_django , (
49- f"Django Version Mismatch: { VERSION [: len (expected_django )]} != "
50- f"{ expected_django } "
51- )
47+ try :
48+ expected_django = tuple (int (v ) for v in expected_django .split ("." ) if v )
49+ assert django .VERSION [: len (expected_django )] == expected_django , (
50+ f"Django Version Mismatch: { django .VERSION [: len (expected_django )]} != "
51+ f"{ expected_django } "
52+ )
53+ except ValueError :
54+ assert expected_django == django .__version__
5255
5356 if expected_db_ver :
5457 if rdbms == "postgres" :
You can’t perform that action at this time.
0 commit comments