Skip to content

Support Python 3.13 #1102

Support Python 3.13

Support Python 3.13 #1102

GitHub Actions / Test Report ubuntu-latest:3.10 failed Dec 3, 2024 in 0s

89 tests run, 81 passed, 5 skipped, 3 failed.

Annotations

Check failure on line 112 in tests/jms/test_projects.py

See this annotation in the file changed.

@github-actions github-actions / Test Report ubuntu-latest:3.10

test_projects.test_project_integration

KeyError: 'prolog'
Raw output
client = <ansys.hps.client.client.Client object at 0x7f3a05b89840>

    def test_project_integration(client):
    
        jms_api = JmsApi(client)
        proj_name = f"test_jms_ProjectTest"
    
        proj = Project(name=proj_name, active=True, priority=10)
        proj = jms_api.create_project(proj, replace=True)
    
        proj = jms_api.get_project(id=proj.id)
        assert proj.creation_time is not None
        assert proj.priority == 10
        assert proj.active == True
    
        proj = jms_api.get_projects(name=proj.name, statistics=True)[0]
        assert proj.statistics["num_jobs"] == 0
    
        # statistics["eval_status"] might get few seconds until is populated on the server
        timeout = time.time() + 120
        while not proj.statistics["eval_status"] and time.time() < timeout:
            time.sleep(2)
            proj = jms_api.get_projects(id=proj.id, statistics=True)[0]
>       assert proj.statistics["eval_status"]["prolog"] == 0
E       KeyError: 'prolog'

tests/jms/test_projects.py:112: KeyError

Check failure on line 226 in tests/jms/test_task_definition_templates.py

See this annotation in the file changed.

@github-actions github-actions / Test Report ubuntu-latest:3.10

test_task_definition_templates.test_template_permissions

AssertionError: assert 'service_account' == 'onprem_account'
  
  - onprem_account
  + service_account
Raw output
client = <ansys.hps.client.client.Client object at 0x7f3a05b89840>
keycloak_client = <keycloak.keycloak_admin.KeycloakAdmin object at 0x7f3a05bb4790>
is_admin = True

    def test_template_permissions(client, keycloak_client, is_admin):
    
        jms_api = JmsApi(client)
    
        templates = jms_api.get_task_definition_templates()
    
        # a regular deployment should have some default templates
        # with read all permissions + some user defined ones with
        # either user or group permissions
        for template in templates:
            permissions = jms_api.get_task_definition_template_permissions(template_id=template.id)
            for permission in permissions:
                assert permission.permission_type in ["organization", "user", "group", "anyone"]
    
        # create new template and check default permissions
        template = TaskDefinitionTemplate(name="my_template", version=uuid.uuid4())
        template = jms_api.create_task_definition_templates([template])[0]
        permissions = jms_api.get_task_definition_template_permissions(template_id=template.id)
        assert len(permissions) == 2
        assert permissions[0].permission_type == "user"
        assert permissions[0].role == "admin"
        assert permissions[0].value_id is not None
        assert permissions[1].permission_type == "organization"
        assert permissions[1].role == "reader"
>       assert permissions[1].value_id == "onprem_account"
E       AssertionError: assert 'service_account' == 'onprem_account'
E         
E         - onprem_account
E         + service_account

tests/jms/test_task_definition_templates.py:226: AssertionError

Check failure on line 338 in tests/jms/test_task_definition_templates.py

See this annotation in the file changed.

@github-actions github-actions / Test Report ubuntu-latest:3.10

test_task_definition_templates.test_template_anyone_permission

AssertionError: assert 'service_account' == 'onprem_account'
  
  - onprem_account
  + service_account
Raw output
client = <ansys.hps.client.client.Client object at 0x7f3a05b89840>
keycloak_client = <keycloak.keycloak_admin.KeycloakAdmin object at 0x7f3a0592a920>

    def test_template_anyone_permission(client, keycloak_client):
    
        jms_api = JmsApi(client)
    
        # create new template and check default permissions
        template = TaskDefinitionTemplate(name="my_template", version=uuid.uuid4())
        template = jms_api.create_task_definition_templates([template])[0]
        permissions = jms_api.get_task_definition_template_permissions(template_id=template.id)
        assert len(permissions) == 2
        assert permissions[0].permission_type == "user"
        assert permissions[0].role == "admin"
        assert permissions[0].value_id is not None
        assert permissions[1].permission_type == "organization"
        assert permissions[1].role == "reader"
>       assert permissions[1].value_id == "onprem_account"
E       AssertionError: assert 'service_account' == 'onprem_account'
E         
E         - onprem_account
E         + service_account

tests/jms/test_task_definition_templates.py:338: AssertionError