mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 07:57:35 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			361 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			361 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| '''Test Vocab.__contains__ works with int keys'''
 | |
| from __future__ import unicode_literals
 | |
| 
 | |
| from ... vocab import Vocab
 | |
| 
 | |
| def test_issue1868():
 | |
|     vocab = Vocab()
 | |
|     lex = vocab['hello']
 | |
|     assert lex.orth in vocab
 | |
|     assert lex.orth_ in vocab
 | |
|     assert 'some string' not in vocab
 | |
|     int_id = vocab.strings.add('some string')
 | |
|     assert int_id not in vocab
 |