22 lines
401 B
Bash
Executable File
22 lines
401 B
Bash
Executable File
#!/usr/bin/env bash
|
|
d="problems/$1"; mkdir -p "$d"
|
|
cat > "$d/solution.py" <<'EOF'
|
|
class Solution:
|
|
def solve(self):
|
|
pass
|
|
EOF
|
|
cat > "$d/solution_test.py" <<'EOF'
|
|
import pytest
|
|
from solution import Solution
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"X,expected",
|
|
[
|
|
([2, 7, 11, 15], [0, 1]),
|
|
],
|
|
)
|
|
def test_REPLACE(X, expected):
|
|
assert Solution().REPLACE(X, expected) == expected
|
|
EOF
|