summaryrefslogtreecommitdiff
path: root/tests/test_javascript.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2021-01-18 21:38:53 +0100
committerGeorg Brandl <georg@python.org>2021-01-20 10:52:51 +0100
commitdc9bf0c256dbd88c72349822d59b25f9d8225dc6 (patch)
tree5ead8cd9fd013a4ad132d258b6ba8c7f5a5cc1c7 /tests/test_javascript.py
parent91474bd6788c6c3124edba1a09fa20860200c92a (diff)
downloadpygments-git-dc9bf0c256dbd88c72349822d59b25f9d8225dc6.tar.gz
tests: code style fixups
Diffstat (limited to 'tests/test_javascript.py')
-rw-r--r--tests/test_javascript.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/test_javascript.py b/tests/test_javascript.py
index 3109f3fe..740b7831 100644
--- a/tests/test_javascript.py
+++ b/tests/test_javascript.py
@@ -8,8 +8,8 @@
import pytest
-from pygments.lexers.javascript import JavascriptLexer, TypeScriptLexer
-from pygments.token import Number, Token
+from pygments.lexers.javascript import JavascriptLexer
+from pygments.token import Number
@pytest.fixture(scope='module')
@@ -29,7 +29,8 @@ def test_float_literal_positive_matches(lexer, text):
assert list(lexer.get_tokens(text))[0] == (Number.Float, text)
-@pytest.mark.parametrize('text', ('.\u0b6a', '.', '1..', '1n', '1ee', '1e', '1e-', '1e--1', '1e++1', '1e1.0'))
+@pytest.mark.parametrize('text', ('.\u0b6a', '.', '1..', '1n', '1ee', '1e',
+ '1e-', '1e--1', '1e++1', '1e1.0'))
def test_float_literals_negative_matches(lexer, text):
"""Test text that should **not** be tokenized as float literals."""
assert list(lexer.get_tokens(text))[0] != (Number.Float, text)
@@ -81,7 +82,3 @@ def test_hexadecimal_literal_positive_matches(lexer, text):
def test_hexadecimal_literals_negative_matches(lexer, text):
"""Test text that should **not** be tokenized as hexadecimal literals."""
assert list(lexer.get_tokens(text))[0] != (Number.Hex, text)
-
-@pytest.fixture(scope='module')
-def ts_lexer():
- yield TypeScriptLexer()