Skip to content

A few tests fail on NixOS #46

Description

@doronbehar

Hello,

We experience these test failures when trying to package this for NixOS:

=================================== FAILURES ===================================
_______________________ TestMcpDeployExecute.test_deploy _______________________
/nix/store/rgnappqqc5vbq60gza5fflyk84sylwl6-python3-3.14.6/lib/python3.14/unittest/mock.py:986: in assert_called_with
    raise AssertionError(_error_message()) from cause
E   AssertionError: expected call not found.
E   Expected: deploy_mcp_server('org/weather-mcp')
E     Actual: deploy_mcp_server('org/weather-mcp', payload=None)

During handling of the above exception, another exception occurred:
/nix/store/rgnappqqc5vbq60gza5fflyk84sylwl6-python3-3.14.6/lib/python3.14/unittest/mock.py:998: in assert_called_once_with
    return self.assert_called_with(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   AssertionError: expected call not found.
E   Expected: deploy_mcp_server('org/weather-mcp')
E     Actual: deploy_mcp_server('org/weather-mcp', payload=None)
E   
E   pytest introspection follows:
E   
E   Kwargs:
E   assert {'payload': None} == {}
E     
E     Left contains 1 more item:
E     {'payload': None}
E     
E     Full diff:
E     - {}
E     + {
E     +     'payload': None,
E     + }

During handling of the above exception, another exception occurred:
tests/cli/test_mcp.py:182: in test_deploy
    mock_api.deploy_mcp_server.assert_called_once_with("org/weather-mcp")
E   AssertionError: expected call not found.
E   Expected: deploy_mcp_server('org/weather-mcp')
E     Actual: deploy_mcp_server('org/weather-mcp', payload=None)
E   
E   pytest introspection follows:
E   
E   Kwargs:
E   assert {'payload': None} == {}
E     
E     Left contains 1 more item:
E     {'payload': None}
E     
E     Full diff:
E     - {}
E     + {
E     +     'payload': None,
E     + }
----------------------------- Captured stdout call -----------------------------
Deploy requested for MCP server: org/weather-mcp
_________________ TestParseTimestamp.test_datetime_passthrough _________________
tests/test_utils.py:197: in test_datetime_passthrough
    assert result is original
E   AssertionError: assert datetime.datetime(2024, 6, 1, 20, 0, tzinfo=zoneinfo.ZoneInfo(key='Asia/Shanghai')) is datetime.datetime(2024, 6, 1, 12, 0, tzinfo=datetime.timezone.utc)
=============================== warnings summary ===============================
tests/cli/test_download.py::TestDownloadExecute::test_collection_download
  /nix/store/c019sk83pds9xzsc9ylx0lpz51m97yl9-python3.14-modelscope-hub-0.1.8/lib/python3.14/site-packages/modelscope_hub/cli/download.py:96: DeprecationWarning: '--collection' is deprecated and will be removed in a future version. Use 'positional repo_id with --repo-type collection' instead.
    normalize_download_args(self.args)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/cli/test_mcp.py::TestMcpDeployExecute::test_deploy - AssertionError: expected call not found.
FAILED tests/test_utils.py::TestParseTimestamp::test_datetime_passthrough - AssertionError: assert datetime.datetime(2024, 6, 1, 20, 0, tzinfo=zoneinfo...
============ 2 failed, 497 passed, 114 skipped, 1 warning in 8.43s =============

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions