Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix some tests
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
  • Loading branch information
arihant2math committed Feb 3, 2025
commit b100c22b1e111756ca131940cba9622b2059e9f2
4 changes: 0 additions & 4 deletions extra_tests/snippets/builtin_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ class MyObject:
assert myobj == myobj
assert not myobj != myobj

object.__subclasshook__() == NotImplemented
object.__subclasshook__(1) == NotImplemented
object.__subclasshook__(1, 2) == NotImplemented

assert MyObject().__eq__(MyObject()) == NotImplemented
assert MyObject().__ne__(MyObject()) == NotImplemented
assert MyObject().__lt__(MyObject()) == NotImplemented
Expand Down
27 changes: 0 additions & 27 deletions extra_tests/snippets/stdlib_imghdr.py

This file was deleted.

35 changes: 0 additions & 35 deletions extra_tests/snippets/stdlib_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,43 +27,8 @@ def sleep(secs):
assert p.poll() == 0
assert p.returncode == 0

p = subprocess.Popen(sleep(2))

assert p.poll() is None

with assert_raises(subprocess.TimeoutExpired):
assert p.wait(1)

p.wait()

assert p.returncode == 0

p = subprocess.Popen(echo("test"), stdout=subprocess.PIPE)
p.wait()


assert p.stdout.read().strip() == b"test"

p = subprocess.Popen(sleep(2))
p.terminate()
p.wait()
if is_unix:
assert p.returncode == -signal.SIGTERM
else:
assert p.returncode == 1

p = subprocess.Popen(sleep(2))
p.kill()
p.wait()
if is_unix:
assert p.returncode == -signal.SIGKILL
else:
assert p.returncode == 1

p = subprocess.Popen(echo("test"), stdout=subprocess.PIPE)
(stdout, stderr) = p.communicate()
assert stdout.strip() == b"test"

p = subprocess.Popen(sleep(5), stdout=subprocess.PIPE)
with assert_raises(subprocess.TimeoutExpired):
p.communicate(timeout=1)
12 changes: 0 additions & 12 deletions extra_tests/snippets/stdlib_xdrlib.py

This file was deleted.

4 changes: 2 additions & 2 deletions extra_tests/snippets/syntax_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def kungfu(x):
assert x == 3


assert Bar.__doc__ == " W00t "
assert Bar.__doc__ == "W00t "

bar = Bar(42)
assert bar.get_x.__doc__ == None
Expand Down Expand Up @@ -147,7 +147,7 @@ class T3:
test3
"""

assert T3.__doc__ == "\n test3\n "
assert T3.__doc__ == "\ntest3\n"

class T4:

Expand Down
2 changes: 1 addition & 1 deletion extra_tests/snippets/syntax_function2.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def f3():
"""
pass

assert f3.__doc__ == "\n test3\n "
assert f3.__doc__ == "\ntest3\n"

def f4():
"test4"
Expand Down