def test_comet_version(comet_mock):
    """Test that CometLogger.version returns an Experiment key."""
    api_key = "key"
    experiment_name = "My Name"

    logger = CometLogger(api_key=api_key, name=experiment_name)
    assert logger._experiment is not None
    _ = logger.version

    logger._experiment.get_key.assert_called()
Test that CometLogger.version returns an Experiment key.
tests/tests_pytorch/loggers/test_comet.py