fetch_ml/cli/tests/jupyter_test.zig

17 lines
640 B
Zig

const std = @import("std");
const testing = std.testing;
const src = @import("src");
test "jupyter top-level action includes create" {
try testing.expect(src.commands.jupyter.isValidTopLevelAction("create"));
try testing.expect(src.commands.jupyter.isValidTopLevelAction("start"));
try testing.expect(!src.commands.jupyter.isValidTopLevelAction("bogus"));
}
test "jupyter defaultWorkspacePath prefixes ./" {
const allocator = testing.allocator;
const p = try src.commands.jupyter.defaultWorkspacePath(allocator, "my-workspace");
defer allocator.free(p);
try testing.expectEqualStrings("./my-workspace", p);
}