Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
simnh committed Feb 28, 2019
1 parent ca4fbf8 commit 76da43e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def test_example_datapackage_readability():
for example in pkg.resource_listdir(
'oemof.tabular', 'examples/datapackages'):

#if example != 'foreignkeys':
systems.append(
ES.from_datapackage(
pkg.resource_filename(
Expand All @@ -27,3 +28,16 @@ def test_example_datapackage_readability():

for system in systems:
assert (type(system) is ES)

def test_scripting_examples():
"""
"""
for example in pkg.resource_listdir(
'oemof.tabular', 'examples/scripting'):
print("Runnig example {} ...".format(example))
exec(
open(
pkg.resource_filename(
'oemof.tabular',
'examples/scripting/{}'.format(example))
).read())

0 comments on commit 76da43e

Please sign in to comment.