aboutsummaryrefslogtreecommitdiffstats
path: root/tests/richstring_test.py
diff options
context:
space:
mode:
authorMartin Vilcans <martin@librador.com>2013-08-13 18:34:19 +0200
committerMartin Vilcans <martin@librador.com>2013-08-13 18:34:19 +0200
commit121dd5374458b38b2ab2a7e2acf30f5256a8d251 (patch)
treeacf3e33955bbfe90ed2d3f33b73791e76d901cad /tests/richstring_test.py
parentbc51cf3d658cfe00ce5b154f51d750283bea6a6e (diff)
downloadscreenplain-121dd5374458b38b2ab2a7e2acf30f5256a8d251.tar.gz
Removed dependency on unittest2
I think I don't use its features and it doesn't exist under that name in Python 3.
Diffstat (limited to 'tests/richstring_test.py')
-rw-r--r--tests/richstring_test.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/richstring_test.py b/tests/richstring_test.py
index 65e1ea7..b9ca3d2 100644
--- a/tests/richstring_test.py
+++ b/tests/richstring_test.py
@@ -2,7 +2,7 @@
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license.php
-import unittest2
+from unittest import TestCase
from screenplain.richstring import (
RichString, Segment,
Bold, Italic,
@@ -13,7 +13,7 @@ from screenplain.richstring import parse_emphasis
from screenplain.types import Slug, Action, Dialog, DualDialog, Transition
-class LowLevelRichStringTests(unittest2.TestCase):
+class LowLevelRichStringTests(TestCase):
def test_plain_string_has_one_single_segment(self):
s = plain('hello')
@@ -22,7 +22,7 @@ class LowLevelRichStringTests(unittest2.TestCase):
self.assertEqual(set(), s.segments[0].styles)
-class RichStringOperatorTests(unittest2.TestCase):
+class RichStringOperatorTests(TestCase):
def test_repr(self):
s = bold('Hello') + plain(' there ') + bold('folks')
@@ -57,7 +57,7 @@ class RichStringOperatorTests(unittest2.TestCase):
self.assertEquals(expected, result)
-class StyleGeneratorTests(unittest2.TestCase):
+class StyleGeneratorTests(TestCase):
def test_bold_function_creates_bold_richstring(self):
self.assertEquals(
@@ -72,7 +72,7 @@ class StyleGeneratorTests(unittest2.TestCase):
)
-class RichStringTests(unittest2.TestCase):
+class RichStringTests(TestCase):
def test_plain_to_html(self):
self.assertEquals('hello', plain('hello').to_html())
@@ -88,7 +88,7 @@ class RichStringTests(unittest2.TestCase):
)
-class ParseEmphasisTests(unittest2.TestCase):
+class ParseEmphasisTests(TestCase):
def test_parse_without_emphasis(self):
self.assertEquals(