def test_df_warn_space(fake_qtile, fake_window):
    """
    Test text is visible and colour changes when space
    below threshold
    """
    df3 = df.DF(warn_space=40)
    fakebar = FakeBar([df3], window=fake_window)
    df3._configure(fake_qtile, fakebar)
    text = df3.poll()

    # See values above
    assert text == "/ (38G|83%)"

    df3.draw()
    assert df3.layout.colour == df3.warn_color

    Test text is visible and colour changes when space
    below threshold
    
test/widgets/test_df.py