mirror of
				https://github.com/Telecominfraproject/oopt-gnpy.git
				synced 2025-10-31 01:57:54 +00:00 
			
		
		
		
	 32d8b2a4d8
			
		
	
	32d8b2a4d8
	
	
	
		
			
			This change siplifies the structure of the simulation parameters, removing the gnpy.science_utils.simulation layer, provides some documentation of the parameters and define a mock fixture for testing in safe mode. Jan: while I'm not thrilled by this concept of hidden global state, we agreed to let it in as a temporary measure (so as not to hold merging of Andrea's flexgrid/multirate patches). I've refactored this to a more pytest-ish way of dealing with fixtures. In the end, it was also possible to remove the MockSimParams class because it was not adding any features on top of what SimParams can do already (and to what was tested). Change-Id: If5ef341e0585586127d5dae3f39dca2c232236f1 Signed-off-by: Jan Kundrát <jan.kundrat@telecominfraproject.com>
		
			
				
	
	
		
			14 lines
		
	
	
		
			397 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			397 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| # SPDX-License-Identifier: BSD-3-Clause
 | |
| #
 | |
| # Copyright (C) 2020 Telecom Infra Project and GNPy contributors
 | |
| # see LICENSE.md for a list of contributors
 | |
| #
 | |
| 
 | |
| import pytest
 | |
| from gnpy.core.parameters import SimParams, NLIParams, RamanParams
 | |
| 
 | |
| 
 | |
| @pytest.fixture
 | |
| def set_sim_params(monkeypatch):
 | |
|     monkeypatch.setattr(SimParams, '_shared_dict', {'nli_params': NLIParams(), 'raman_params': RamanParams()})
 |