How to use the clevercsv.normal_form.is_form_2 function in clevercsv

To help you get started, we’ve selected a few clevercsv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alan-turing-institute / CleverCSV / tests / test_unit / test_normal_forms.py View on Github external
def test_form_2(self):
        dialect = SimpleDialect(delimiter=",", quotechar="", escapechar="")

        self.assertTrue(is_form_2("1,2,3", dialect))
        self.assertTrue(is_form_2("1,2,3\na,b,c\n", dialect))
        self.assertTrue(is_form_2("a@b.com,3", dialect))
        self.assertTrue(is_form_2("a,,3\n1,2,3", dialect))

        self.assertFalse(is_form_2("1,2,3\n1,2\n4,5,6", dialect))
        self.assertFalse(is_form_2("1", dialect))
        self.assertFalse(is_form_2('1,"a"', dialect))
        self.assertFalse(is_form_2("a;b,3", dialect))
        self.assertFalse(is_form_2('"a,3,3\n1,2,3', dialect))
        self.assertFalse(is_form_2('a,"",3\n1,2,3', dialect))
github alan-turing-institute / CleverCSV / tests / test_unit / test_normal_forms.py View on Github external
def test_form_2(self):
        dialect = SimpleDialect(delimiter=",", quotechar="", escapechar="")

        self.assertTrue(is_form_2("1,2,3", dialect))
        self.assertTrue(is_form_2("1,2,3\na,b,c\n", dialect))
        self.assertTrue(is_form_2("a@b.com,3", dialect))
        self.assertTrue(is_form_2("a,,3\n1,2,3", dialect))

        self.assertFalse(is_form_2("1,2,3\n1,2\n4,5,6", dialect))
        self.assertFalse(is_form_2("1", dialect))
        self.assertFalse(is_form_2('1,"a"', dialect))
        self.assertFalse(is_form_2("a;b,3", dialect))
        self.assertFalse(is_form_2('"a,3,3\n1,2,3', dialect))
        self.assertFalse(is_form_2('a,"",3\n1,2,3', dialect))
github alan-turing-institute / CleverCSV / tests / test_unit / test_normal_forms.py View on Github external
def test_form_2(self):
        dialect = SimpleDialect(delimiter=",", quotechar="", escapechar="")

        self.assertTrue(is_form_2("1,2,3", dialect))
        self.assertTrue(is_form_2("1,2,3\na,b,c\n", dialect))
        self.assertTrue(is_form_2("a@b.com,3", dialect))
        self.assertTrue(is_form_2("a,,3\n1,2,3", dialect))

        self.assertFalse(is_form_2("1,2,3\n1,2\n4,5,6", dialect))
        self.assertFalse(is_form_2("1", dialect))
        self.assertFalse(is_form_2('1,"a"', dialect))
        self.assertFalse(is_form_2("a;b,3", dialect))
        self.assertFalse(is_form_2('"a,3,3\n1,2,3', dialect))
        self.assertFalse(is_form_2('a,"",3\n1,2,3', dialect))
github alan-turing-institute / CleverCSV / tests / test_unit / test_normal_forms.py View on Github external
def test_form_2(self):
        dialect = SimpleDialect(delimiter=",", quotechar="", escapechar="")

        self.assertTrue(is_form_2("1,2,3", dialect))
        self.assertTrue(is_form_2("1,2,3\na,b,c\n", dialect))
        self.assertTrue(is_form_2("a@b.com,3", dialect))
        self.assertTrue(is_form_2("a,,3\n1,2,3", dialect))

        self.assertFalse(is_form_2("1,2,3\n1,2\n4,5,6", dialect))
        self.assertFalse(is_form_2("1", dialect))
        self.assertFalse(is_form_2('1,"a"', dialect))
        self.assertFalse(is_form_2("a;b,3", dialect))
        self.assertFalse(is_form_2('"a,3,3\n1,2,3', dialect))
        self.assertFalse(is_form_2('a,"",3\n1,2,3', dialect))
github alan-turing-institute / CleverCSV / tests / test_unit / test_normal_forms.py View on Github external
def test_form_2(self):
        dialect = SimpleDialect(delimiter=",", quotechar="", escapechar="")

        self.assertTrue(is_form_2("1,2,3", dialect))
        self.assertTrue(is_form_2("1,2,3\na,b,c\n", dialect))
        self.assertTrue(is_form_2("a@b.com,3", dialect))
        self.assertTrue(is_form_2("a,,3\n1,2,3", dialect))

        self.assertFalse(is_form_2("1,2,3\n1,2\n4,5,6", dialect))
        self.assertFalse(is_form_2("1", dialect))
        self.assertFalse(is_form_2('1,"a"', dialect))
        self.assertFalse(is_form_2("a;b,3", dialect))
        self.assertFalse(is_form_2('"a,3,3\n1,2,3', dialect))
        self.assertFalse(is_form_2('a,"",3\n1,2,3', dialect))
github alan-turing-institute / CleverCSV / tests / test_unit / test_normal_forms.py View on Github external
def test_form_2(self):
        dialect = SimpleDialect(delimiter=",", quotechar="", escapechar="")

        self.assertTrue(is_form_2("1,2,3", dialect))
        self.assertTrue(is_form_2("1,2,3\na,b,c\n", dialect))
        self.assertTrue(is_form_2("a@b.com,3", dialect))
        self.assertTrue(is_form_2("a,,3\n1,2,3", dialect))

        self.assertFalse(is_form_2("1,2,3\n1,2\n4,5,6", dialect))
        self.assertFalse(is_form_2("1", dialect))
        self.assertFalse(is_form_2('1,"a"', dialect))
        self.assertFalse(is_form_2("a;b,3", dialect))
        self.assertFalse(is_form_2('"a,3,3\n1,2,3', dialect))
        self.assertFalse(is_form_2('a,"",3\n1,2,3', dialect))
github alan-turing-institute / CleverCSV / tests / test_unit / test_normal_forms.py View on Github external
def test_form_2(self):
        dialect = SimpleDialect(delimiter=",", quotechar="", escapechar="")

        self.assertTrue(is_form_2("1,2,3", dialect))
        self.assertTrue(is_form_2("1,2,3\na,b,c\n", dialect))
        self.assertTrue(is_form_2("a@b.com,3", dialect))
        self.assertTrue(is_form_2("a,,3\n1,2,3", dialect))

        self.assertFalse(is_form_2("1,2,3\n1,2\n4,5,6", dialect))
        self.assertFalse(is_form_2("1", dialect))
        self.assertFalse(is_form_2('1,"a"', dialect))
        self.assertFalse(is_form_2("a;b,3", dialect))
        self.assertFalse(is_form_2('"a,3,3\n1,2,3', dialect))
        self.assertFalse(is_form_2('a,"",3\n1,2,3', dialect))
github alan-turing-institute / CleverCSV / tests / test_unit / test_normal_forms.py View on Github external
def test_form_2(self):
        dialect = SimpleDialect(delimiter=",", quotechar="", escapechar="")

        self.assertTrue(is_form_2("1,2,3", dialect))
        self.assertTrue(is_form_2("1,2,3\na,b,c\n", dialect))
        self.assertTrue(is_form_2("a@b.com,3", dialect))
        self.assertTrue(is_form_2("a,,3\n1,2,3", dialect))

        self.assertFalse(is_form_2("1,2,3\n1,2\n4,5,6", dialect))
        self.assertFalse(is_form_2("1", dialect))
        self.assertFalse(is_form_2('1,"a"', dialect))
        self.assertFalse(is_form_2("a;b,3", dialect))
        self.assertFalse(is_form_2('"a,3,3\n1,2,3', dialect))
        self.assertFalse(is_form_2('a,"",3\n1,2,3', dialect))
github alan-turing-institute / CleverCSV / tests / test_unit / test_normal_forms.py View on Github external
def test_form_2(self):
        dialect = SimpleDialect(delimiter=",", quotechar="", escapechar="")

        self.assertTrue(is_form_2("1,2,3", dialect))
        self.assertTrue(is_form_2("1,2,3\na,b,c\n", dialect))
        self.assertTrue(is_form_2("a@b.com,3", dialect))
        self.assertTrue(is_form_2("a,,3\n1,2,3", dialect))

        self.assertFalse(is_form_2("1,2,3\n1,2\n4,5,6", dialect))
        self.assertFalse(is_form_2("1", dialect))
        self.assertFalse(is_form_2('1,"a"', dialect))
        self.assertFalse(is_form_2("a;b,3", dialect))
        self.assertFalse(is_form_2('"a,3,3\n1,2,3', dialect))
        self.assertFalse(is_form_2('a,"",3\n1,2,3', dialect))
github alan-turing-institute / CleverCSV / tests / test_unit / test_normal_forms.py View on Github external
def test_form_2(self):
        dialect = SimpleDialect(delimiter=",", quotechar="", escapechar="")

        self.assertTrue(is_form_2("1,2,3", dialect))
        self.assertTrue(is_form_2("1,2,3\na,b,c\n", dialect))
        self.assertTrue(is_form_2("a@b.com,3", dialect))
        self.assertTrue(is_form_2("a,,3\n1,2,3", dialect))

        self.assertFalse(is_form_2("1,2,3\n1,2\n4,5,6", dialect))
        self.assertFalse(is_form_2("1", dialect))
        self.assertFalse(is_form_2('1,"a"', dialect))
        self.assertFalse(is_form_2("a;b,3", dialect))
        self.assertFalse(is_form_2('"a,3,3\n1,2,3', dialect))
        self.assertFalse(is_form_2('a,"",3\n1,2,3', dialect))