Example #1
0
def test_create_monthly_wateruse_dict4():
    """ Test create_monthly_wateruse_dict() part 4 - testing October, November, December """

    # description of test        
    description = "Test sum_values() : part 4 - test creating a dictionary with monthly keys (October, November, December) having values that correspond to the sum total water use"     

    # expected values to test with actual values
    expected = {"October": 4.0,
                "November": 4.0,
                "December": 4.0,
    } 

    # actual values       
    actual = wateruse.create_monthly_wateruse_dict(wateruse_data = fixture["wateruse_data_months_OND"], wateruse_value = 4.0)  

    # assert equality
    _perform_assertion(actual, expected, description = description)  
Example #2
0
def test_create_monthly_wateruse_dict2():
    """ Test create_monthly_wateruse_dict() part 2 - testing April, May, June """

    # description of test        
    description = "Test sum_values() : part 2 - test creating a dictionary with monthly keys (April, May, June) having values that correspond to the sum total water use"     

    # expected values to test with actual values
    expected = {"April": 2.0,
                "May": 2.0,
                "June": 2.0,
    } 

    # actual values       
    actual = wateruse.create_monthly_wateruse_dict(wateruse_data = fixture["wateruse_data_months_AMJ"], wateruse_value = 2.0)  
   
    # assert equality
    _perform_assertion(actual, expected, description = description)  
Example #3
0
def test_create_monthly_wateruse_dict3():
    """ Test create_monthly_wateruse_dict() part 3 - testing July, August, September """

    # description of test        
    description = "Test sum_values() : part 3 - test creating a dictionary with monthly keys (July, August, September) having values that correspond to the sum total water use"     

    # expected values to test with actual values
    expected = {"July": 3.0,
                "August": 3.0,
                "September": 3.0,
    } 

    # actual values       
    actual = wateruse.create_monthly_wateruse_dict(wateruse_data = fixture["wateruse_data_months_JAS"], wateruse_value = 3.0)  

    # assert equality
    _perform_assertion(actual, expected, description = description)   
Example #4
0
def test_create_monthly_wateruse_dict1():
    """ Test create_monthly_wateruse_dict() part 1 - testing January, Februray, March """

    # description of test        
    description = "Test sum_values() : part 1 - test creating a dictionary with monthly keys (January, Februray, March) having values that correspond to the sum total water use"     

    # expected values to test with actual values
    expected = {"January": 5.0,
                "February": 5.0,
                "March": 5.0,
    } 

    # actual values       
    actual = wateruse.create_monthly_wateruse_dict(wateruse_data = fixture["wateruse_data"], wateruse_value = 5.0)  

    # assert equality
    _perform_assertion(actual, expected, description = description)