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
8081863a
Commit
8081863a
authored
2 months ago
by
Adam Blank
Browse files
Options
Download
Email Patches
Plain Diff
Update test_apply_direction.py
parent
70feae49
master
No related merge requests found
Pipeline
#118944
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/1.B/test_apply_direction.py
+10
-11
tests/1.B/test_apply_direction.py
with
10 additions
and
11 deletions
+10
-11
tests/1.B/test_apply_direction.py
View file @
8081863a
...
@@ -2,19 +2,18 @@ import pytest
...
@@ -2,19 +2,18 @@ import pytest
from
src.harder_computer
import
apply_direction
from
src.harder_computer
import
apply_direction
from
tests.helpers.naming
import
apply_names
from
tests.helpers.naming
import
apply_names
@
pytest
.
mark
.
parametrize
(
'input1, input2, expected'
,
apply_names
(
'apply_direction'
,
[
True
,
True
,
False
],
[
@
pytest
.
mark
.
parametrize
(
'input1, input2, expected'
,
apply_names
(
'apply_direction'
,
[
True
,
True
,
False
],
[
((
0
,
0
),
(
0
,
0
),
(
0
,
0
)),
((
0
,
0
),
(
0
,
0
),
(
0
,
0
)),
((
0
,
0
),
(
1
,
0
),
(
1
,
0
)),
((
0
,
0
),
(
1
,
0
),
(
1
,
0
)),
((
0
,
0
),
(
-
1
,
0
),
(
-
1
,
0
)),
((
0
,
0
),
(
-
1
,
0
),
(
-
1
,
0
)),
((
0
,
0
),
(
0
,
1
),
(
0
,
1
)),
((
0
,
0
),
(
0
,
1
),
(
0
,
1
)),
((
0
,
0
),
(
0
,
-
1
),
(
0
,
-
1
)),
((
0
,
0
),
(
0
,
-
1
),
(
0
,
-
1
)),
((
1
,
2
),
(
0
,
0
),
(
1
,
2
)),
((
1
,
2
),
(
0
,
0
),
(
1
,
2
)),
((
3
,
2
),
(
-
1
,
-
1
),
(
2
,
1
)),
((
3
,
2
),
(
-
1
,
-
1
),
(
2
,
1
)),
((
1
,
3
),
(
5
,
5
),
(
6
,
8
)),
((
1
,
3
),
(
5
,
5
),
(
6
,
8
)),
]))
]))
def
test_apply_direction
(
input1
,
input2
,
expected
):
def
test_apply_direction
(
input1
,
input2
,
expected
):
result
=
apply_direction
(
input1
,
input2
)
result
=
apply_direction
(
input1
,
input2
)
assert
expected
==
result
,
(
f
"On an 8x8 board, the following inputs to the apply_direction "
assert
expected
==
result
,
(
f
"On an 8x8 board, the following inputs to the apply_direction "
f
"function:
\n
{
input1
}
,
{
input2
}
\n
lead to the following output:"
f
"function:
\n
{
input1
}
and
{
input2
}
\n
lead to the expected output:
\n
{
expected
}
."
)
f
"
\n
{
result
}
\n
when we expect:
\n
{
expected
}
."
)
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