summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test.py13
-rw-r--r--tests/test_cli.py2
-rw-r--r--tests/test_deprecated.py2
-rw-r--r--tests/test_setup.py2
4 files changed, 15 insertions, 4 deletions
diff --git a/tests/test.py b/tests/test.py
index a16178b..2c1a0ea 100644
--- a/tests/test.py
+++ b/tests/test.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# Copyright (c) 2013, 2016 Yu-Jie Lin
+# Copyright (c) 2017 Leo Hemsted
# Licensed under the BSD License, for detailed license information, see COPYING
import doctest
import unittest
+from time import time
import smartypants
from smartypants import smartypants as sp
@@ -147,6 +148,16 @@ document.write('<a href="' + href + '">' + linktext + "</a>");
self.assertEqual(sp('"quote here"', Attr.set1 | Attr.s),
'"quote here"')
+ def test_incredibly_long_string(self):
+ # make sure it doesn't take too long with a long string
+ start = time()
+
+ sp("a" * 10000)
+
+ end = time()
+
+ self.assertLess(end - start, 0.2)
+
def load_tests(loader, tests, pattern):
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 263f319..e85545a 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013 Yu-Jie Lin
+# Copyright (c) 2017 Leo Hemsted
# Licensed under the BSD License, for detailed license information, see COPYING
from __future__ import unicode_literals
diff --git a/tests/test_deprecated.py b/tests/test_deprecated.py
index 8d4fc7e..0f554e9 100644
--- a/tests/test_deprecated.py
+++ b/tests/test_deprecated.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (c) 2013, 2016 Yu-Jie Lin
+# Copyright (c) 2017 Leo Hemsted
# Licensed under the BSD License, for detailed license information, see COPYING
import unittest
diff --git a/tests/test_setup.py b/tests/test_setup.py
index e5eb654..20e4678 100644
--- a/tests/test_setup.py
+++ b/tests/test_setup.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013 Yu-Jie Lin
+# Copyright (c) 2017 Leo Hemsted
# Licensed under the BSD License, for detailed license information, see COPYING
import unittest