Changeset: 58938e277f84 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/58938e277f84
Modified Files:
        sql/test/copy/Tests/compressed_on_client.py
Branch: copyfaster
Log Message:

Use platform line endings in csv round-trip test

First we use COPY INTO table to load data, then we use COPY SELECT
INTO file to retrieve it and verify they are the same. The latter
COPY inserts \r's on Windows.  We can make the test succeed by also
putting \r's in the original test data.


diffs (12 lines):

diff --git a/sql/test/copy/Tests/compressed_on_client.py 
b/sql/test/copy/Tests/compressed_on_client.py
--- a/sql/test/copy/Tests/compressed_on_client.py
+++ b/sql/test/copy/Tests/compressed_on_client.py
@@ -55,7 +55,7 @@ def run_the_tests(algo_name, compress, d
     print('#')
 
     test_data = [(1, 'one'), (2, 'two'), (3, 'three')]
-    csv_data = ''.join(f'{i}|{s}\n' for i, s in test_data)
+    csv_data = ''.join(f'{i}|{s}{os.linesep}' for i, s in test_data)
     bin_data = bytes(csv_data, 'utf-8')
     compressed_data = compress(bin_data)
 
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to