Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc tweaks #222

Merged
merged 3 commits into from
Apr 6, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add S road sample and change paths
  • Loading branch information
Andres Fortier committed Apr 6, 2017
commit 99bccd213f8095a8f65c834827781a871c595ed3
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ ENV/

# Generated files
generated_worlds/*
tests/samples
tests/samples/*
terminus/tests/samples
terminus/tests/samples/*
/.project
2 changes: 1 addition & 1 deletion terminus/generate_test_cities.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def name(self):

for city in test_cities:
builder = SampleBuilder(city)
path = 'generated_worlds/tests/'
path = 'terminus/tests/samples/'
name = slugify(city.name, separator="_")
process = CityGenerationProcess(builder, RNDF_ORIGIN, path, True, name)
process.run()
Empty file.
21 changes: 21 additions & 0 deletions terminus/tests/test_cities_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,27 @@ def two_non_collinear_segments_less_than_border_city(self):

return city

def S_road_city(self):
"""
(50,12) *------- (100, 12)
|
|
(0, 0) ---* (50,0)
"""
city = City("S road")

s1 = Street.from_control_points([
Point(0, 0),
Point(50, 0),
Point(50, 15),
Point(100, 15)
])
s1.name = "s1"

city.add_road(s1)

return city

def L_intersection_city(self):
"""
(0,100)
Expand Down