Exemplo n.º 1
0
def test_to_file():
    sky = CIE(38.186734, 270.410387)
    sky_file = sky.to_file('./tests/assets/temp', mkdir=True)
    assert os.path.isfile(sky_file)
    with open(sky_file, 'r') as skyf:
        content = skyf.read()

    assert sky.to_radiance() in str(content)
Exemplo n.º 2
0
def test_check_defaults():
    sky = CIE(38.186734, 270.410387)
    assert sky.altitude == 38.186734
    assert sky.azimuth == 270.410387
    assert sky.ground_reflectance == 0.2
    sky_radiance = sky.to_radiance()
    assert '!gensky -ang 38.186734 90.410387 +s -g 0.200' in sky_radiance
    assert sky.ground_hemisphere.to_radiance() in sky_radiance
    assert sky.sky_hemisphere.to_radiance() in sky_radiance
    assert sky.is_climate_based is False
    assert sky.is_point_in_time is True