Example #1
0
    def test_hypen_in_tag(self):
        self.assertEqual(
            tags("@tag, @my-tag, bla bla @do-this-today,\
                 it has @con--tinuous---hypen-s-"),
            ["@tag", "@my-tag", "@do-this-today", "@con--tinuous---hypen-s"])

        self.assertEqual(tags("@hypen-at-end- some other text"),
                         ["@hypen-at-end"])
        self.assertEqual(tags("@hypen-at-end-, with comma"), ["@hypen-at-end"])
Example #2
0
    def test_hypen_in_tag(self):
        self.assertEqual(
            tags("@tag, @my-tag, bla bla @do-this-today,\
                 it has @con--tinuous---hypen-s-"),
            ["@tag", "@my-tag", "@do-this-today", "@con--tinuous---hypen-s"])

        self.assertEqual(tags("@hypen-at-end- some other text"),
                         ["@hypen-at-end"])
        self.assertEqual(tags("@hypen-at-end-, with comma"), ["@hypen-at-end"]
                         )
Example #3
0
 def test_colon(self):
     self.assertEqual(
         tags("@tag:, @my:tag, bla bla @do:this:today:, @co:l-on/s-,\
              @:dot/s:, with @com,mas"), [
             "@tag", "@my:tag", "@do:this:today", "@co:l-on/s", "@:dot/s",
             "@com"
         ])
Example #4
0
 def test_slash(self):
     self.assertEqual(
         tags("@tag/, @my/tag, bla bla @do/this/today/,\
              @hy-p-/ens with @slash/es/"),
         ["@tag", "@my/tag", "@do/this/today", "@hy-p-/ens", "@slash/es"])
Example #5
0
 def test_dot(self):
     self.assertEqual(tags("text @gtg-0.3"), ["@gtg-0.3"])
     self.assertEqual(
         tags("@tag., @my.tag, bla bla @do.this.today,\
              also contains @hy-pen-.s"),
         ["@tag", "@my.tag", "@do.this.today", "@hy-pen-.s"])
Example #6
0
 def test_tag_at_end(self):
     self.assertEqual(tags("some text ended with @endtag"), ["@endtag"])
Example #7
0
 def test_tag_at_beginning(self):
     self.assertEqual(tags("@tag some other text"), ["@tag"])
Example #8
0
 def test_empty(self):
     self.assertEqual(tags(""), [])
Example #9
0
 def test_colon(self):
     self.assertEqual(
         tags("@tag:, @my:tag, bla bla @do:this:today:, @co:l-on/s-,\
              @:dot/s:, with @com,mas"),
         ["@tag", "@my:tag", "@do:this:today", "@co:l-on/s", "@:dot/s",
          "@com"])
Example #10
0
 def test_slash(self):
     self.assertEqual(
         tags("@tag/, @my/tag, bla bla @do/this/today/,\
              @hy-p-/ens with @slash/es/"),
         ["@tag", "@my/tag", "@do/this/today", "@hy-p-/ens", "@slash/es"])
Example #11
0
 def test_dot(self):
     self.assertEqual(tags("text @gtg-0.3"), ["@gtg-0.3"])
     self.assertEqual(
         tags("@tag., @my.tag, bla bla @do.this.today,\
              also contains @hy-pen-.s"),
         ["@tag", "@my.tag", "@do.this.today", "@hy-pen-.s"])
Example #12
0
 def test_tag_at_end(self):
     self.assertEqual(tags("some text ended with @endtag"), ["@endtag"])
Example #13
0
 def test_tag_at_beginning(self):
     self.assertEqual(tags("@tag some other text"), ["@tag"])
Example #14
0
 def test_empty(self):
     self.assertEqual(tags(""), [])