Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
small fix to hack
  • Loading branch information
erezsh committed Dec 21, 2022
commit af76f92e183bdc924a28057c72aaf49737e3d78a
4 changes: 3 additions & 1 deletion data_diff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
### Temporary patch
import sqeleton.utils

new_base = ''.join([chr(x) for x in range(32,127)])
new_base = ''.join([chr(x) for x in range(32,127)]).replace("'", "")
n2a = sqeleton.utils.numberToAlphanum
a2n = sqeleton.utils.alphanumToNumber

Expand All @@ -25,6 +25,8 @@ def alphanumToNumber(alphanum: str) -> int:

sqeleton.utils.numberToAlphanum = numberToAlphanum
sqeleton.utils.alphanumToNumber = alphanumToNumber
sqeleton.utils.alphanums = new_base

###


Expand Down
4 changes: 2 additions & 2 deletions tests/test_diff_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def test_alphanum_keys(self):
diff = list(differ.diff_tables(self.a, self.b))
self.assertEqual(diff, [("-", (str(self.new_alphanum), "This one is different"))])

self.connection.query([self.src_table.insert_row("@@@", "<-- this bad value should not break us"), commit])
self.connection.query([self.src_table.insert_row("@@@\x03", "<-- this bad value should not break us"), commit])

self.a = table_segment(self.connection, self.table_src_path, "id", "text_comment", case_sensitive=False)
self.b = table_segment(self.connection, self.table_dst_path, "id", "text_comment", case_sensitive=False)
Expand Down Expand Up @@ -485,7 +485,7 @@ def test_varying_alphanum_keys(self):
self.assertEqual(diff, [("-", (str(self.new_alphanum), "This one is different"))])

self.connection.query(
self.src_table.insert_row("@@@", "<-- this bad value should not break us"),
self.src_table.insert_row("@@@\x04", "<-- this bad value should not break us"),
commit,
)

Expand Down