Skip to content

Fix #1129: typo in parameter names in serializer_test.py - #1130

Open
mhucka wants to merge 1 commit into
tensorflow:masterfrom
mhucka:fix-1129
Open

mhucka wants to merge 1 commit into
tensorflow:masterfrom
mhucka:fix-1129

Conversation

@mhucka

@mhucka mhucka commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

In tensorflow_quantum/core/serialize/serializer_test.py, test_serialize_circuit_wrong_type and test_deserialize_circuit_wrong_type passed input instead of the actual parameter, inp. Because the symbol input does exist in Python (it's a Python built-in), but it's neither a cirq.Circuit nor a tfq.proto.Program, TypeError would get raised, masking that the parameterized values ('wrong', 1.0, None, []) were never passed into the serializer functions.

Fix: replace input by inp.

In `tensorflow_quantum/core/serialize/serializer_test.py`,
`test_serialize_circuit_wrong_type` and
`test_deserialize_circuit_wrong_type` were passing `input` instead of
the actual parameterized test argument, `inp`. Because `input`
exists:(it's a Python built-in), but is neither a `cirq.Circuit` nor a
`tfq.proto.Program`, `TypeError` was raised by accident, masking that
the parameterized values (`'wrong'`, `1.0`, `None`, `[]`) were never
passed into the serializer functions.

Fix: `input` → `inp`.
@mhucka mhucka changed the title Fix #1129: typo in parameter name Fix #1129: typo in parameter names in serializer_test.py Oct 27, 2026
@mhucka
mhucka marked this pull request as ready for review October 27, 2026 22:47

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request corrects a bug in tensorflow_quantum/core/serialize/serializer_test.py where the test methods test_serialize_circuit_wrong_type and test_deserialize_circuit_wrong_type incorrectly referenced the Python built-in input instead of the passed parameter inp. I have no feedback to provide as there are no review comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant