Changeset: 5de6ae63e7a4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5de6ae63e7a4
Modified Files:
sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py
sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out
Branch: Oct2014
Log Message:
Use BETWEEN and properly typed arguments in test.
diffs (24 lines):
diff --git a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py
b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py
--- a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py
+++ b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py
@@ -12,7 +12,7 @@ def main():
stdout = process.PIPE, stderr = process.PIPE)
currenttime = time.strftime('%H:%M:%S', time.localtime(time.time()))
#SQL command for checking the localtime
- sqlcommand = "select (localtime() - time '%s' < time '00:00:20') and (time
'%s' - localtime() < time '00:00:20');" % (currenttime, currenttime)
+ sqlcommand = "select localtime() between (time '%s' - interval '20'
second) and (time '%s' + interval '20' second);" % (currenttime, currenttime)
out, err = clt.communicate(sqlcommand)
sys.stdout.write(out)
sys.stderr.write(err)
diff --git a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out
b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out
--- a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out
+++ b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out
@@ -50,7 +50,7 @@ Ready.
#select (localtime() - time '09:58:27' < time '00:00:20') and (time '09:58:27'
- localtime() < time '00:00:20');
% .L # table_name
-% sql_sub_localtime # name
+% and_>=_localtime # name
% boolean # type
% 5 # length
[ true ]
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list