mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 18:07:26 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			393 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			393 B
		
	
	
	
		
			Python
		
	
	
	
	
	
# coding: utf-8
 | 
						|
from __future__ import unicode_literals
 | 
						|
 | 
						|
import pytest
 | 
						|
 | 
						|
 | 
						|
@pytest.mark.parametrize('text,number', [("7am", "7"), ("11p.m.", "11")])
 | 
						|
def test_issue736(en_tokenizer, text, number):
 | 
						|
    """Test that times like "7am" are tokenized correctly and that numbers are converted to string."""
 | 
						|
    tokens = en_tokenizer(text)
 | 
						|
    assert len(tokens) == 2
 | 
						|
    assert tokens[0].text == number
 |