Skip to content

Commit

Permalink
testing started
Browse files Browse the repository at this point in the history
  • Loading branch information
eggimasv authored and eggimasv committed Feb 24, 2017
1 parent f143d33 commit ee9532b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions energy_demand/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ def energy_demand_model(data, pop_data_external):

# Add electricity data to result dict for wrapper
result_dict = mf.add_demand_result_dict(0, e_app_bd, data['fuel_type_lu'], reg_pop, timesteps, result_dict, data['timesteps_own_selection'])
print(result_dict[0][0])
prnt("..")
#print(result_dict[0][0])
#prnt("..")
# Add gas data
result_dict = mf.add_demand_result_dict(1, g_hd_bd, data['fuel_type_lu'], reg_pop, timesteps, result_dict, data['timesteps_own_selection'])

Expand Down
17 changes: 13 additions & 4 deletions tests/test_skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@
# -*- coding: utf-8 -*-

import pytest
from energy_demand.skeleton import fib
import energy_demand.main_functions as mf

__author__ = "Will Usher"
__copyright__ = "Will Usher"
__license__ = "mit"

def test_conversion_ktoe_gwh():

# in test value
in_value = 10
expected = in_value * 11.6300000

# call function
out_value = mf.conversion_ktoe_gwh(in_value)

assert out_value == expected
# ----
'''
def test_fib():
assert fib(1) == 1
assert fib(2) == 1
assert fib(7) == 13
with pytest.raises(AssertionError):
fib(-10)
'''

0 comments on commit ee9532b

Please sign in to comment.