mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 01:04:34 +03:00
Fix formatting
This commit is contained in:
parent
e0ff145a8b
commit
c6ae49e8bf
|
@ -10,6 +10,7 @@ def test_create_doc_underscore():
|
||||||
assert uscore._start is None
|
assert uscore._start is None
|
||||||
assert uscore._end is None
|
assert uscore._end is None
|
||||||
|
|
||||||
|
|
||||||
def test_doc_underscore_getattr_setattr():
|
def test_doc_underscore_getattr_setattr():
|
||||||
doc = Mock()
|
doc = Mock()
|
||||||
doc.doc = doc
|
doc.doc = doc
|
||||||
|
@ -20,6 +21,7 @@ def test_doc_underscore_getattr_setattr():
|
||||||
doc._.hello = True
|
doc._.hello = True
|
||||||
assert doc._.hello == True
|
assert doc._.hello == True
|
||||||
|
|
||||||
|
|
||||||
def test_create_span_underscore():
|
def test_create_span_underscore():
|
||||||
span = Mock(doc=Mock(), start=0, end=2)
|
span = Mock(doc=Mock(), start=0, end=2)
|
||||||
uscore = Underscore(Underscore.span_extensions, span,
|
uscore = Underscore(Underscore.span_extensions, span,
|
||||||
|
@ -28,6 +30,7 @@ def test_create_span_underscore():
|
||||||
assert uscore._start is span.start
|
assert uscore._start is span.start
|
||||||
assert uscore._end is span.end
|
assert uscore._end is span.end
|
||||||
|
|
||||||
|
|
||||||
def test_span_underscore_getter_setter():
|
def test_span_underscore_getter_setter():
|
||||||
span = Mock(doc=Mock(), start=0, end=2)
|
span = Mock(doc=Mock(), start=0, end=2)
|
||||||
Underscore.span_extensions['hello'] = (None, None,
|
Underscore.span_extensions['hello'] = (None, None,
|
||||||
|
@ -36,7 +39,7 @@ def test_span_underscore_getter_setter():
|
||||||
value))
|
value))
|
||||||
span._ = Underscore(Underscore.span_extensions, span,
|
span._ = Underscore(Underscore.span_extensions, span,
|
||||||
start=span.start, end=span.end)
|
start=span.start, end=span.end)
|
||||||
|
|
||||||
assert span._.hello == (0, 'hi')
|
assert span._.hello == (0, 'hi')
|
||||||
span._.hello = 1
|
span._.hello = 1
|
||||||
assert span._.hello == (1, 'hi')
|
assert span._.hello == (1, 'hi')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user