mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Steal part of modifications from #6007
This commit is contained in:
parent
be70e7b96e
commit
7ce6a71c95
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
from __future__ import print_function
|
||||
import os, itertools, urllib
|
||||
import os, itertools, urllib, urllib2, sys
|
||||
|
||||
def get_ch_answer(query):
|
||||
return urllib.urlopen(os.environ.get('CLICKHOUSE_URL', 'http://localhost:' + os.environ.get('CLICKHOUSE_PORT_HTTP', '8123') ), data=query).read()
|
||||
@ -124,12 +124,23 @@ def main():
|
||||
sql_file = open(base_name + '.sql', 'wt')
|
||||
ref_file = open(base_name + '.reference', 'wt')
|
||||
|
||||
for (v1, v2) in itertools.combinations(VALUES, 2):
|
||||
num_int_tests = len(VALUES) ** 2
|
||||
|
||||
if 'int1' in sys.argv[1:]:
|
||||
for (v1, v2) in itertools.islice(itertools.combinations(VALUES, 2), None, num_int_tests / 2):
|
||||
q, a = test_pair(v1, v2)
|
||||
if GENERATE_TEST_FILES:
|
||||
sql_file.write(q + ";\n")
|
||||
ref_file.write(a + "\n")
|
||||
|
||||
if 'int2' in sys.argv[1:]:
|
||||
for (v1, v2) in itertools.islice(itertools.combinations(VALUES, 2), num_int_tests / 2, None):
|
||||
q, a = test_pair(v1, v2)
|
||||
if GENERATE_TEST_FILES:
|
||||
sql_file.write(q + ";\n")
|
||||
ref_file.write(a + "\n")
|
||||
|
||||
if 'float' in sys.argv[1:]:
|
||||
for (i, f) in itertools.product(VALUES_INT, VALUES_FLOAT):
|
||||
q, a = test_float_pair(i, f)
|
||||
if GENERATE_TEST_FILES:
|
||||
|
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
. $CURDIR/../shell_config.sh
|
||||
|
||||
# We should have correct env vars from shell_config.sh to run this test
|
||||
|
||||
python $CURDIR/00411_long_accurate_number_comparison.python float
|
@ -0,0 +1 @@
|
||||
PASSED
|
@ -5,4 +5,4 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
|
||||
# We should have correct env vars from shell_config.sh to run this test
|
||||
|
||||
python $CURDIR/00411_long_accurate_number_comparison.python
|
||||
python $CURDIR/00411_long_accurate_number_comparison.python int1
|
@ -0,0 +1 @@
|
||||
PASSED
|
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
. $CURDIR/../shell_config.sh
|
||||
|
||||
# We should have correct env vars from shell_config.sh to run this test
|
||||
|
||||
python $CURDIR/00411_long_accurate_number_comparison.python int2
|
Loading…
Reference in New Issue
Block a user