• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

source-academy / py-slang / 23611698139

26 Mar 2026 06:36PM UTC coverage: 58.635% (+17.4%) from 41.233%
23611698139

Pull #81

github

web-flow
Merge d03813453 into 553cb45dc
Pull Request #81: Python chapter 2 (+ 3?) support

792 of 1641 branches covered (48.26%)

Branch coverage included in aggregate %.

428 of 596 new or added lines in 33 files covered. (71.81%)

17 existing lines in 4 files now uncovered.

2396 of 3796 relevant lines covered (63.12%)

3054.3 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/src/stdlib/stream.ts
1
import { Context } from "../cse-machine/context";
2
import { ControlItem } from "../cse-machine/control";
3
import { BuiltinValue, ListValue, NoneValue, Value } from "../cse-machine/stash";
4
import { Validate } from "../stdlib";
1✔
5
import streamPrelude from "./stream.prelude";
1✔
6
import { Group, GroupName } from "./utils";
1✔
7

8
const streamBuiltins = new Map<string, BuiltinValue>();
1✔
9

10
class StreamBuiltins {
11
  @Validate(0, null, "stream", true)
12
  static stream(
1✔
13
    args: Value[],
14
    source: string,
15
    command: ControlItem,
16
    context: Context,
17
  ): ListValue | NoneValue {
NEW
18
    if (args.length === 0) {
×
NEW
19
      return { type: "none" };
×
20
    }
NEW
21
    const head = args[0];
×
NEW
22
    return {
×
23
      type: "list",
24
      value: [
25
        head,
26
        {
27
          type: "builtin",
28
          name: "anonymous stream",
NEW
29
          func: () => StreamBuiltins.stream(args.slice(1), source, command, context),
×
30
        },
31
      ],
32
    };
33
  }
34
}
35
for (const builtin of Object.getOwnPropertyNames(StreamBuiltins)) {
1✔
36
  if (
4✔
37
    typeof StreamBuiltins[builtin as keyof typeof StreamBuiltins] === "function" &&
5✔
38
    !builtin.startsWith("_")
39
  ) {
40
    streamBuiltins.set(builtin, {
1✔
41
      type: "builtin",
42
      func: StreamBuiltins[builtin as keyof typeof StreamBuiltins] as BuiltinValue["func"],
43
      name: builtin,
44
    });
45
  }
46
}
47
export default {
1✔
48
  name: GroupName.STREAMS,
49
  prelude: streamPrelude,
50
  builtins: streamBuiltins,
51
} as Group;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc