Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Dec 7, 2023
1 parent 05becbf commit e6919d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/operatordict_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ def test_operatordict_constructor(self):
"""
d = {1: "hello", 2: "goodbye"}
with self.assertRaises(AttributeError):
o = OperatorDict(d)
OperatorDict(d)
with self.assertRaises(AttributeError):
o = OperatorDict(d, apply=1)
OperatorDict(d, apply=1)
with self.assertRaises(AttributeError):
o = OperatorDict(d, quote=1)
OperatorDict(d, quote=1)
o = OperatorDict(d, apply=1, quote=2)
print(o)
# Why does the constructed Operator dict contain entries for "apply":1 and "quote":2 ?
Expand Down
1 change: 1 addition & 0 deletions tests/operators_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def test_unknown_op_reserved(self):
with self.assertRaises(EvalError):
default_unknown_op(b"\xff\xff" + suffix, SExp.null())

# TODO: which assert are we trying to check here?
with self.assertRaises(EvalError):
# an empty atom is not a valid opcode
self.assertEqual(default_unknown_op(b"", SExp.null()), (1, SExp.null()))
Expand Down
6 changes: 3 additions & 3 deletions tests/to_sexp_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ def test_convert_atom(self):
assert convert_atom_to_bytes(DummyByteConvertible()) == b"foobar"

with self.assertRaises(ValueError):
assert convert_atom_to_bytes([1, 2, 3])
convert_atom_to_bytes([1, 2, 3])

with self.assertRaises(ValueError):
assert convert_atom_to_bytes((1, 2))
convert_atom_to_bytes((1, 2))

with self.assertRaises(ValueError):
assert convert_atom_to_bytes({})
convert_atom_to_bytes({})

0 comments on commit e6919d3

Please sign in to comment.