Skip to content

Commit

Permalink
added an explicit test for creating a database (implicitly tests db c…
Browse files Browse the repository at this point in the history
…onnection); also added failfast=True to help move towards better #340
  • Loading branch information
carlhiggs committed Jul 4, 2023
1 parent fb21bce commit e12c62a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions process/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,16 @@ def test_3_load_example_region(self):
codename = 'example_ES_Las_Palmas_2023'
r = ghsci.Region(codename)

def test_4_example_analysis(self):
"""Analyse example region."""
def test_4_create_db(self):
"""Load example region."""
codename = 'example_ES_Las_Palmas_2023'
r = ghsci.Region(codename)
r._create_database()

def test_5_example_analysis(self):
"""Analyse example region."""
codename = 'example_ES_Las_Palmas_2023'
r = ghsci.Region(codename)
r._create_study_region()
r._create_osm_resources()
r._create_network_resources()
Expand All @@ -68,13 +73,13 @@ def test_4_example_analysis(self):
r._neighbourhood_analysis()
r._area_analysis()

def test_5_example_generate(self):
def test_6_example_generate(self):
"""Generate resources for example region."""
codename = 'example_ES_Las_Palmas_2023'
r = ghsci.Region(codename)
r.generate()

def test_6_sensitivity(self):
def test_7_sensitivity(self):
"""Test sensitivity analysis of urban intersection parameter."""
reference = 'example_ES_Las_Palmas_2023'
comparison = 'ES_Las_Palmas_2023_test_not_urbanx'
Expand Down Expand Up @@ -118,4 +123,4 @@ def calculate_line_endings(path):


if __name__ == '__main__':
unittest.main()
unittest.main(failfast=True)

0 comments on commit e12c62a

Please sign in to comment.