Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for delimited data without quote character and/or escape character #83

Open
roskakori opened this issue Jan 8, 2015 · 0 comments

Comments

@roskakori
Copy link
Owner

Goal: delimited data can have no quote character

Example CID-fragment:

D,format,delimited
D,quote character,none

Internally, the quote/escape character should be None similar to line_separator.

Consequently DataFormat.validate() must ensure that without quote_character and escape character the decimal_separator and thousands separator differ from item and line delimiter. Proposed test case for this:

def test_fails_on_no_quote_and_escapte_character_with_same_item_delimiter_and_thousands_separator(self):
     delimited_format = data.DataFormat(data.FORMAT_DELIMITED)
     delimited_format.set_property(data.KEY_ESCAPE_CHARACTER, 'none')
     delimited_format.set_property(data.KEY_ITEM_DELIMITER, '.')
     delimited_format.set_property(data.KEY_QUOTE_CHARACTER, 'none')
     delimited_format.set_property(data.KEY_THOUSANDS_SEPARATOR, '.')
         self.assertRaises(errors.InterfaceError, delimited_format.validate)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant