@@ -240,7 +240,7 @@ def test_deploy_app_update(factory: AppFactory) -> None:
240240 assert update_deploy_result .app .updated_round == confirmed_round
241241
242242
243- def test_deploy_app_update_detects_extra_pages_as_breaking_change (
243+ def test_deploy_app_update_detects_extra_page_deficit_as_breaking_change (
244244 algorand : AlgorandClient , funded_account : SigningAccount
245245) -> None :
246246 small_app_spec = (Path (__file__ ).parent .parent / "artifacts" / "extra_pages_test" / "small.arc56.json" ).read_text ()
@@ -271,6 +271,36 @@ def test_deploy_app_update_detects_extra_pages_as_breaking_change(
271271 assert small_client .app_id != large_client .app_id
272272
273273
274+ def test_deploy_app_update_detects_extra_page_surplus_as_non_breaking_change (
275+ algorand : AlgorandClient , funded_account : SigningAccount
276+ ) -> None :
277+ small_app_spec = (Path (__file__ ).parent .parent / "artifacts" / "extra_pages_test" / "small.arc56.json" ).read_text ()
278+ large_app_spec = (Path (__file__ ).parent .parent / "artifacts" / "extra_pages_test" / "large.arc56.json" ).read_text ()
279+ factory = algorand .client .get_app_factory (
280+ app_spec = small_app_spec ,
281+ default_sender = funded_account .address ,
282+ )
283+ small_client , create_deploy_result = factory .deploy (
284+ compilation_params = {
285+ "updatable" : True ,
286+ },
287+ create_params = AppClientBareCallCreateParams (extra_program_pages = 1 ),
288+ )
289+ assert create_deploy_result .operation_performed == OperationPerformed .Create
290+ assert create_deploy_result .create_result
291+
292+ factory ._app_spec = Arc56Contract .from_json (large_app_spec ) # noqa: SLF001
293+ large_client , update_deploy_result = factory .deploy (
294+ compilation_params = {
295+ "updatable" : True ,
296+ },
297+ on_schema_break = OnSchemaBreak .AppendApp ,
298+ on_update = OnUpdate .UpdateApp ,
299+ )
300+ assert update_deploy_result .operation_performed == OperationPerformed .Update
301+ assert small_client .app_id == large_client .app_id
302+
303+
274304def test_deploy_app_update_abi (factory : AppFactory ) -> None :
275305 _ , create_deploy_result = factory .deploy (
276306 compilation_params = {
0 commit comments