import numpy as np
from granatpy.metrics import compute_all_metrics

def test_compute_all_metrics():
    # Create two identical arrays
    img1 = np.random.randint(0, 256, (10, 10, 3), dtype=np.uint8)
    img2 = img1.copy()
    
    # Compute metrics
    metrics = compute_all_metrics(img1, img2, verbose=False)
    
    assert isinstance(metrics, dict)
    
    expected_keys = ["MSE", "PSNR", "SSIM", "NRMSE", "Nf_real", "Nf_synthetic", "dNf"]
    for key in expected_keys:
        assert key in metrics
        
    # Since images are identical
    assert metrics["MSE"] == 0.0
    assert metrics["dNf"] == 0.0
    assert metrics["SSIM"] == 1.0
