Skip to content

Commit f7a6266

Browse files
committed
More dynamic version control
1 parent d43d84d commit f7a6266

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tests/nuodb_basic_test.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -466,18 +466,19 @@ def test_connection_properties(self):
466466
cursor.execute("select getReleaseversion() from dual")
467467
except ProgrammingError as pe:
468468
return #2.0 or earlier, skip test
469-
469+
470+
#Determine NuoDB version in the form Major.Minor
470471
version = cursor.fetchone()[0]
471-
majorVersion = version[0]
472-
minorVersion = version[2]
473-
if(majorVersion is '2'):
474-
if(minorVersion is not '3'):
472+
majorVersion = int(version[0])
473+
minorVersion = int(version[2])
474+
if(majorVersion == 2):
475+
if(minorVersion < 3):
475476
return
476477

477478
clientInfo = "NuoDB Python driver"
478479
tmp_args = self.connect_kw_args.copy()
479480
tmp_args['options'] = {'schema': 'test', 'clientInfo': clientInfo}
480-
con = pynuodb.connect(**tmp_args)#self._connect({'clientInfo':'Hello World'})
481+
con = pynuodb.connect(**tmp_args)
481482
cursor = con.cursor()
482483
cursor.execute("select * from SYSTEM.CONNECTIONS")
483484
result = cursor.fetchone()

0 commit comments

Comments
 (0)