From 5b26a78c1f1f07f7ab444be0dc3fe0d64c1e17ad Mon Sep 17 00:00:00 2001 From: Colin Dellow Date: Wed, 4 Jul 2018 19:14:35 -0400 Subject: [PATCH] Improve random query generation ...throw in the occasional `NOT` --- tests/test-random | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test-random b/tests/test-random index 1b3dc3f..e42e2e5 100755 --- a/tests/test-random +++ b/tests/test-random @@ -47,7 +47,9 @@ def generate_statement(conn, table, column_values, all_values): if random.randint(0, 1) == 0: values = all_values value = values[random.randint(0, len(values) - 1)] - query += field + ' ' + op + ' ' + str(value) + if random.randint(0, 5) == 0: + query += ' NOT ' + query += '(' + field + ' ' + op + ' ' + str(value) + ')' if random.randint(0, 3) == 0: how_many = random.randint(0, 15)