mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	* Fix the first `nlp` call for `ja` (closes #2901) * Add unicode declaration, formatting and use relative import
		
			
				
	
	
		
			18 lines
		
	
	
		
			305 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			305 B
		
	
	
	
		
			Python
		
	
	
	
	
	
# coding: utf8
 | 
						|
from __future__ import unicode_literals
 | 
						|
 | 
						|
import pytest
 | 
						|
 | 
						|
from ...lang.ja import Japanese
 | 
						|
 | 
						|
 | 
						|
def test_issue2901():
 | 
						|
    """Test that `nlp` doesn't fail."""
 | 
						|
    try:
 | 
						|
        nlp = Japanese()
 | 
						|
    except ImportError:
 | 
						|
        pytest.skip()
 | 
						|
 | 
						|
    doc = nlp("pythonが大好きです")
 | 
						|
    assert doc
 |