aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Vilcans <martin@librador.com>2022-11-07 20:49:18 +0100
committerMartin Vilcans <martin@librador.com>2022-11-07 20:49:18 +0100
commit388a7807427cca871f60716edb36f4133db8d9c3 (patch)
treecd63d4af16098567fa6340eddcf150d623c6b0bf
parentb08119fbfec9b3baaed32107a846c93cec339d57 (diff)
downloadscreenplain-388a7807427cca871f60716edb36f4133db8d9c3.tar.gz
Remove unittest2 (Python 2 compatibility)
-rw-r--r--requirements.txt1
-rw-r--r--tests/fdx_test.py2
-rw-r--r--tests/files_test.py2
-rw-r--r--tests/fountain_test.py2
-rw-r--r--tests/richstring_test.py2
-rw-r--r--tests/testcompat.py17
6 files changed, 4 insertions, 22 deletions
diff --git a/requirements.txt b/requirements.txt
index a818b80..ca58340 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,3 @@
reportlab
-unittest2
nose
pycodestyle
diff --git a/tests/fdx_test.py b/tests/fdx_test.py
index 3a3c8f7..236509a 100644
--- a/tests/fdx_test.py
+++ b/tests/fdx_test.py
@@ -2,7 +2,7 @@
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license.php
-from testcompat import TestCase
+from unittest import TestCase
from io import StringIO
from screenplain.export.fdx import write_text
diff --git a/tests/files_test.py b/tests/files_test.py
index 4254f55..11949e7 100644
--- a/tests/files_test.py
+++ b/tests/files_test.py
@@ -4,7 +4,7 @@
from __future__ import with_statement
-from testcompat import TestCase
+from unittest import TestCase
import tempfile
import os
import os.path
diff --git a/tests/fountain_test.py b/tests/fountain_test.py
index 141772a..c804ab9 100644
--- a/tests/fountain_test.py
+++ b/tests/fountain_test.py
@@ -2,7 +2,7 @@
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license.php
-from testcompat import TestCase
+from unittest import TestCase
from screenplain.parsers import fountain
from screenplain.types import (
diff --git a/tests/richstring_test.py b/tests/richstring_test.py
index 82b2af0..dd64112 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
-from testcompat import TestCase
+from unittest import TestCase
from screenplain.richstring import (
RichString, Segment,
Bold, Italic,
diff --git a/tests/testcompat.py b/tests/testcompat.py
deleted file mode 100644
index e0d0cba..0000000
--- a/tests/testcompat.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (c) 2011 Martin Vilcans
-# Licensed under the MIT license:
-# http://www.opensource.org/licenses/mit-license.php
-
-"""Provides compatibility between Python 2 and 3.
-
-In Python 2 we use the unittest2 module.
-The functionality of that module is already in Python 3,
-so we don't depend on it.
-This module exports the TestCase class from whatever unittest library we have.
-
-"""
-
-try:
- from unittest2 import TestCase
-except ImportError:
- from unittest import TestCase