mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-10-30 22:46:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			281 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			281 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import pytest
 | |
| 
 | |
| from nonebot.plugin import PluginManager
 | |
| 
 | |
| 
 | |
| @pytest.mark.asyncio
 | |
| async def test_load_plugin_name():
 | |
|     m = PluginManager(plugins=["dynamic.manager"])
 | |
|     module1 = m.load_plugin("manager")
 | |
|     module2 = m.load_plugin("dynamic.manager")
 | |
|     assert module1 is module2
 |