Exemplo n.º 1
0
 def test_abstraction_10(self):
     out = detect_pattern.make_abstraction(
         'A,"B,C|"D"',
         SimpleDialect(delimiter=",", quotechar='"', escapechar="|"),
     )
     exp = "CDC"
     self.assertEqual(exp, out)
Exemplo n.º 2
0
 def test_abstraction_9(self):
     out = detect_pattern.make_abstraction(
         "A,B|,C",
         SimpleDialect(delimiter=",", quotechar="", escapechar="|"),
     )
     exp = "CDC"
     self.assertEqual(exp, out)
Exemplo n.º 3
0
 def test_abstraction_5(self):
     out = detect_pattern.make_abstraction(
         'a,"bc""d"",|"f|""',
         SimpleDialect(delimiter=",", quotechar='"', escapechar="|"),
     )
     exp = "CDC"
     self.assertEqual(exp, out)
Exemplo n.º 4
0
 def test_abstraction_8(self):
     out = detect_pattern.make_abstraction(
         ',"",,\r\n',
         SimpleDialect(delimiter=",", quotechar='"', escapechar=""),
     )
     exp = "CDCDCDC"
     self.assertEqual(exp, out)
Exemplo n.º 5
0
 def test_abstraction_3(self):
     out = detect_pattern.make_abstraction(
         "a,a,\n,a,a\ra,a,a\r\n",
         SimpleDialect(delimiter=",", quotechar="", escapechar=""),
     )
     exp = "CDCDCRCDCDCRCDCDC"
     self.assertEqual(exp, out)