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"])
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"] )
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" ])
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"])
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"])
def test_tag_at_end(self): self.assertEqual(tags("some text ended with @endtag"), ["@endtag"])
def test_tag_at_beginning(self): self.assertEqual(tags("@tag some other text"), ["@tag"])
def test_empty(self): self.assertEqual(tags(""), [])
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"])