Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs1-25sp
project02
Commits
8b3507e0
Commit
8b3507e0
authored
2 months ago
by
Adam Blank
Browse files
Options
Download
Email Patches
Plain Diff
Update test_computer_placement.py
parent
8bb21c97
master
No related merge requests found
Pipeline
#118939
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/0.D/test_computer_placement.py
+2
-1
tests/0.D/test_computer_placement.py
with
2 additions
and
1 deletion
+2
-1
tests/0.D/test_computer_placement.py
View file @
8b3507e0
...
...
@@ -108,7 +108,8 @@ def test_generate_ship_coordinates(size, orientation):
@
pytest
.
mark
.
parametrize
(
'ship, ships, expected'
,
apply_names
(
'is_conflict'
,
[
True
,
True
,
False
],
conflicts
[::
10
]))
def
test_is_conflict
(
ship
,
ships
,
expected
):
assert
expected
==
is_conflict
(
ship
,
ships
)
assert
expected
==
is_conflict
(
ship
,
ships
),
f
"there should "
+
(
"not "
if
not
expected
else
""
)
+
f
"be a conflict between
{
ship
}
and
{
ships
}
"
@
pytest
.
mark
.
parametrize
(
'seed'
,
apply_names
(
'place_ships'
,
[
"seed = "
],
[[
x
]
for
x
in
range
(
1000
,
3000
)]))
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help