Skip to content

Commit

Permalink
Add long SELFIES test case
Browse files Browse the repository at this point in the history
  • Loading branch information
haydn-jones committed Jul 13, 2024
1 parent fd7e190 commit 4b70c1e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_specific_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,12 @@ def test_old_symbols():
sf.decoder(long_s, compatible=True)
except Exception:
assert False

def test_large_selfies_decoding():
"""Test that we can decode extremely large SELFIES strings (used to cause a RecursionError)
"""

large_selfies = "[C]" * 1024
expected_smiles = "C" * 1024

assert decode_eq(large_selfies, expected_smiles)

0 comments on commit 4b70c1e

Please sign in to comment.