def test_reset():
	component = make_component()
	component2 = make_component()

	assert NamedComponent.names_used == ['Test', 'Test 2']
	NamedComponent.reset()

	assert NamedComponent.names_used == []
	assert make_component().name == 'Test'
def test_reset():
    component = make_component()
    component2 = make_component()

    assert NamedComponent.names_used == ['Test', 'Test 2']
    NamedComponent.reset()

    assert NamedComponent.names_used == []
    assert make_component().name == 'Test'
Esempio n. 3
0
 def _clear_caches(cls):
     """Clear all data caches in global namespace related to a session"""
     WorldObject.reset()
     NamedComponent.reset()
     AIPlayer.clear_caches()
     SelectableBuildingComponent.reset()
Esempio n. 4
0
	def _clear_caches(cls):
		"""Clear all data caches in global namespace related to a session"""
		WorldObject.reset()
		NamedComponent.reset()
		AIPlayer.clear_caches()
		SelectableBuildingComponent.reset()
	def tearDown(self):
		NamedComponent.reset()
 def tearDown(self):
     NamedComponent.reset()