Skip to content
Snippets Groups Projects
Commit c370d357 authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Change from print-based to data-based output.

parent b6dd60b6
No related branches found
No related tags found
No related merge requests found
[flake8]
extend-ignore = D105
per-file-ignores =
tests/*: D103
max-line-length = 99
/*
.case { color: ; }
.splat { color: ; }
.array { color: ; }
.parse-error { color: ; }
.parameter { color: ; }
.string { color: ; }
.regex { color: ; }
.invoke { color: ; }
.default { color: ; }
.call { color: ; }
.qr { color: ; }
.lambda { color: ; }
.number { color: ; }
.regex-body { color: ; }
.call-method { color: ; }
*/
.literal { color: green; }
.true {}
.false {}
.undef {}
.keyword { color: orange; }
.class {}
.or {}
.define {}
.unless {}
.if {}
.else {}
.function {}
.and {}
.in {}
.type { color: darkgreen; }
.qn { color: darkgreen; }
.var { color: blue; }
.str-var { color: blue; }
.name { color: red; }
.string {
color: olive;
}
This diff is collapsed.
.qn {
color: green;
}
.var {
color: blue;
}
.define {
color: orange;
}
.name {
color: red;
}
.string {
color: olive;
}
.str-var {
color: pink;
}
.qr {
color: darkgreen;
}
.compound-type {
color: lightblue;
}
.undef {
color: lightgray;
}
.number {
color: red;
}
/* -------------------------------------------------- */
......@@ -57,6 +18,11 @@ h2 {
/* -------------------------------------------------- */
.documentation {
display: none;
}
/*
.var {
position: relative;
}
......@@ -74,3 +40,4 @@ h2 {
.var:hover .documentation {
display: block;
}
*/
from main import intersperse
def test_intersperse():
assert list(intersperse(1, [2, 3, 4])) == [2, 1, 3, 1, 4]
def test_intersperse_empty():
assert list(intersperse(1, [])) == []
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment