Skip to content

Commit

Permalink
add test #24
Browse files Browse the repository at this point in the history
  • Loading branch information
OnnoEbbens committed Oct 19, 2023
1 parent 30eeb88 commit c730cab
Showing 1 changed file with 20 additions and 25 deletions.
45 changes: 20 additions & 25 deletions autotest/test_03_practical_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

# make projectdir accessible inside this script
tst_dir = os.path.dirname(os.path.realpath(__file__))
nb_dir = os.path.join(
tst_dir, "..", *('', 'practical_examples'))
nb_dir = os.path.join(tst_dir, "..", *("", "practical_examples"))

# Does not work, test disabled.
# # def test_AHN_downloader():
Expand All @@ -15,20 +14,16 @@


def test_Delfland_waterways():
fpath_rel = [
'01_GIS', '02_Delfland_waterways',
'Delfland_waterways.ipynb'
]
fpath_rel = ["01_GIS", "02_Delfland_waterways", "Delfland_waterways.ipynb"]
fname = os.path.join(nb_dir, *fpath_rel)
tf.run_notebook(fname, clearoutput=False)


# # Does not work, needs fixing
# def test_wms_plot():
# fpath_rel = ['01_GIS', '03_plot_wms_data', 'wms_plot.ipynb']
# fname = os.path.join(nb_dir, *fpath_rel)
# tf.run_notebook(fname, clearoutput=False)
# return 0
def test_wms_plot():
fpath_rel = ["01_GIS", "03_plot_wms_data", "wms_plot.ipynb"]
fname = os.path.join(nb_dir, *fpath_rel)
tf.run_notebook(fname, clearoutput=False)
return 0


# Test disabled because of error in the notebook
Expand All @@ -40,17 +35,17 @@ def test_Delfland_waterways():


def test_CO2_emissions_map():
fpath_rel = [
'02_data_analysis', '02_CO2_emissions', 'CO2_emissions_map.ipynb']
fpath_rel = ["02_data_analysis", "02_CO2_emissions", "CO2_emissions_map.ipynb"]
fname = os.path.join(nb_dir, *fpath_rel)
tf.run_notebook(fname, clearoutput=False)


def test_congress_twitter_analysis():
fpath_rel = [
'02_data_analysis', '03_congress_twitter_analysis',
'congress_twitter_analysis.ipynb'
]
"02_data_analysis",
"03_congress_twitter_analysis",
"congress_twitter_analysis.ipynb",
]
fname = os.path.join(nb_dir, *fpath_rel)
tf.run_notebook(fname, clearoutput=False)

Expand Down Expand Up @@ -125,48 +120,48 @@ def test_congress_twitter_analysis():


def test_Folium02_CheckZorder():
fpath_rel = ['04_folium', 'Folium02_CheckZorder.ipynb']
fpath_rel = ["04_folium", "Folium02_CheckZorder.ipynb"]
fname = os.path.join(nb_dir, *fpath_rel)
tf.run_notebook(fname, clearoutput=False)


def test_Folium03_Colormaps():
fpath_rel = ['04_folium', 'Folium03_Colormaps.ipynb']
fpath_rel = ["04_folium", "Folium03_Colormaps.ipynb"]
fname = os.path.join(nb_dir, *fpath_rel)
tf.run_notebook(fname, clearoutput=False)


def test_Folium04_ContinuousWorld():
fpath_rel = ['04_folium', 'Folium04_ContinuousWorld.ipynb']
fpath_rel = ["04_folium", "Folium04_ContinuousWorld.ipynb"]
fname = os.path.join(nb_dir, *fpath_rel)
tf.run_notebook(fname, clearoutput=False)


def test_Folium05_ControlScale():
fpath_rel = ['04_folium', 'Folium05_ControlScale.ipynb']
fpath_rel = ["04_folium", "Folium05_ControlScale.ipynb"]
fname = os.path.join(nb_dir, *fpath_rel)
tf.run_notebook(fname, clearoutput=False)


def test_Folium06_FloatImage():
fpath_rel = ['04_folium', 'Folium06_FloatImage.ipynb']
fpath_rel = ["04_folium", "Folium06_FloatImage.ipynb"]
fname = os.path.join(nb_dir, *fpath_rel)
tf.run_notebook(fname, clearoutput=False)


def test_Folium07_WMS_and_WMTS():
fpath_rel = ['04_folium', 'Folium07_WMS_and_WMTS.ipynb']
fpath_rel = ["04_folium", "Folium07_WMS_and_WMTS.ipynb"]
fname = os.path.join(nb_dir, *fpath_rel)
tf.run_notebook(fname, clearoutput=False)


def test_01_cmdline():
fpath_rel = ['09_creating_programs', '01-cmdline.ipynb']
fpath_rel = ["09_creating_programs", "01-cmdline.ipynb"]
fname = os.path.join(nb_dir, *fpath_rel)
tf.run_notebook(fname, clearoutput=False)


def test_Parallel_processing():
fpath_rel = ['11_ParallelProcessing', 'Parallel processing.ipynb']
fpath_rel = ["11_ParallelProcessing", "Parallel processing.ipynb"]
fname = os.path.join(nb_dir, *fpath_rel)
tf.run_notebook(fname, clearoutput=False)

0 comments on commit c730cab

Please sign in to comment.