Skip to content

[Bug]: Rational cannot be formatted using float specification in notebook tests #633

Description

@d-kad

Where did you find this bug?

PyGambit

What operating system are you using?

macOS

What version of Gambit are you using?

Version: 16.4.0

What happened?

When running pytest tests/test_tutorials.py I get the following error:

E           ---------------------------------------------------------------------------
E           TypeError                                 Traceback (most recent call last)
E           Cell In[30], line 7
E                 2 print(
E                 3     f"{player.label}'s expected payoffs:"
E                 4 )
E                 5 for action in player.actions:
E                 6     print(
E           ----> 7         f"At information set {action.infoset.number}, "
E                 8         f"when playing {action.label} - "
E                 9         f"gnm: {gnm_eqm.as_behavior().action_value(action):.4f}"
E                10         f", lcp: {eqm.action_value(action):.4f}"
E                11     )
E                12 print()
E           
E           TypeError: unsupported format string passed to Rational.__format__

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions