File: test_stdin.py

package info (click to toggle)
serd 0.32.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 8,816 kB
  • sloc: ansic: 7,229; python: 518; makefile: 5
file content (20 lines) | stat: -rwxr-xr-x 521 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python3

# Copyright 2022-2023 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: ISC

"""Test reading from stdin with serdi."""

# pylint: disable=consider-using-f-string

import serd_test_util as util

args = util.wrapper_args(__doc__)
command = [args.serdi, "-i", "ntriples", "-", "http://example.org"]

DOC = "<{0}s> <{0}p> <{0}o> .".format("http://example.org/")

lines = util.command_output(args.wrapper, command, DOC).splitlines(True)

assert len(lines) == 1
assert lines[0].strip() == DOC