Skip to content

Instantly share code, notes, and snippets.

@Mic92
Created May 14, 2021 10:19
Show Gist options
  • Select an option

  • Save Mic92/7344c702d2e98c2947b1bf3d481a0934 to your computer and use it in GitHub Desktop.

Select an option

Save Mic92/7344c702d2e98c2947b1bf3d481a0934 to your computer and use it in GitHub Desktop.
diff --git a/tests/test_single_commands.py b/tests/test_single_commands.py
index 3eaed01..45b1d7a 100644
--- a/tests/test_single_commands.py
+++ b/tests/test_single_commands.py
@@ -25,8 +25,8 @@ def main() -> None:
proc = run_project_executable(
"shell", input="ls /proc/self/fd\n", stdout=subprocess.PIPE
)
- out = proc.stdout
- expected = "0\n1\n2\n3\n"
+ out = proc.stdout.strip()
+ expected = "0\n1\n2\n3"
assert (
out == expected
), f"Child process has not expected number of file descriptors: expected: {expected}, got {out}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment