def test_default_attributes():
    """Test the default attributes when no environment variables are set."""
    env = LightningEnvironment()
    assert not env.creates_processes_externally
    assert env.main_address == "127.0.0.1"
    assert isinstance(env.main_port, int)
    assert env.world_size() == 1
    assert env.local_rank() == 0
    assert env.node_rank() == 0
Test the default attributes when no environment variables are set.
tests/tests_fabric/plugins/environments/test_lightning.py