"""Round-trip tests for test_fused_parents.py."""

import pytest

from roundtrip.roundtrip_helpers import roundtrip_smiles

SMILES = [
    "c1cnc2cc[nH]c2c1",
    "CN1C=NC2=C1C(=O)N(C(=O)N2C)C",
    "c1cc2ccc3cccc4ccc(c1)c2c34",
    "c1ccc2ccccc2c1",
    "C1CC2=CC=CC3=C2C1=CC=C3",
    "c1oc2ncccc2c1",
    "c1ccc2cc3ncccc3cc2c1",
    "c1oc2nc3occc3cc2c1",
    "c1ccc2cc3ccccc3cc2c1",
    "c1ccc2c(c1)ccc1ccccc12",
    "c1ccc2ncccc2c1",
    "c1ccc2cnccc2c1",
    "Cc1ccc2ncccc2c1",
    "COc1ccc2ncccc2c1",
    "N#Cc1ccc2ncccc2c1",
    "O=C(O)c1ccc2ncccc2c1",
    "Cc1ccc2cnccc2c1",
    "n1cccc2ncccc12",
    "n1cccc2cnccc12",
    "n1cccc2ccncc12",
    "n1cccc2cccnc12",
    "c1nccc2cnccc12",
    "c1nccc2ccncc12",
    "Cc1nccc2cnccc12",
    "n1cncc2ccccc12",
    "n1ccnc2ccccc12",
    "n1nccc2ccccc12",
    "c1nncc2ccccc12",
    "Cc1ncnc2ccccc12",
    "c1ccc2[nH]ccc2c1",
    "c1ccc2occc2c1",
    "c1ccc2sccc2c1",
    "c1ccc2nc3ccccc3cc2c1",
    "C1=Cc2ccccc2C1",
    "c1ccc2c(c1)CCc1ccccc1-2",
    "c1ccc2cc3c(ccc4ccccc43)cc2c1",
    "c1ccc2cc3cc4ccccc4cc3cc2c1",
    "c1ccc2cc3cc4cc5ccccc5cc4cc3cc2c1",
    "c1ccc2c(c1)-c1ccccc1-2",
    "c1ccc2c(c1)c1ccccc1c1ccccc21",
    "c1ncc2nc[nH]c2n1",
    "c1ccc2[nH]ncc2c1",
    "c1ccc2ncncc2c1",
    "c1ccc2nccnc2c1",
    "c1ccc2cnncc2c1",
    "c1ccc2nnccc2c1",
    "c1ccc2nc3ccccc3nc2c1",
    "c1ccc2c(c1)[nH]c1ccccc12",
    "c1ccc2c(c1)CCOc1ccccc1-2",
    "c1ccc2c(c1)CCSc1ccccc1-2",
    "C1=COc2ccccc2C1",
    "C1=Cc2ccccc2OC1",
    "N1CCCC2=CC=CC=C12",
    "C1CCC2=CC=CC=C2C1",
    "Oc1cccc2c1NCCC2",
    "C1Cc2ncccc2O1",
    "N1CCc2ncccc2C1",
    "C1CNc2ncccc2C1",
    "c1[se]c2ncccc2c1",
    "c1oc2nccnc2c1",
    "c1oc2ncncc2c1",
    "c1nnc2ncccc2c1",
    "c1[nH]c2ncccc2n1",
    "c1ccc2cc3ncncc3cc2c1",
    "c1ccc2cc3nccnc3cc2c1",
    "c1ccc2cc3cnncc3cc2c1",
    "c1ccc2cc3nnccc3cc2c1",
    "c1oc2cc3ncncc3cc2c1",
    "c1sc2cc3ncncc3cc2c1",
    "c1oc2cc3nccnc3cc2c1",
    "c1sc2cc3nccnc3cc2c1",
    "c1oc2cc3cnncc3cc2c1",
    "c1oc2cc3nnccc3cc2c1",
    "c1oc2cc3nc4ccccc4nc3cc2c1",
    "c1sc2cc3nc4ccccc4nc3cc2c1",
    "c1oc2cc3[nH]ncc3cc2c1",
    "c1oc2nc3occc3nc2c1",
    "c1sc2nc3sccc3nc2c1",
    "c1oc2nc3sccc3cc2c1",
    "c1sc2nc3occc3cc2c1",
    "c1ccc2c(c1)ccc1c3ccccc3ccc21",
    "c1ccc2c(c1)ccc1cc3c(ccc4ccccc43)cc12",
    "Cc1cccc2ccccc12",
    "Cc1ccc2ccccc2c1",
    "Oc1cccc2ccccc12",
    "Nc1cccc2ccccc12",
    "Sc1cccc2ccccc12",
    "Oc1cccc2ncccc12",
    "Nc1cccc2[nH]ccc12",
    "Oc1cccc2occc12",
    "Oc1ccc2cc3ccccc3cc2c1",
    "Oc1ccc2c(c1)ccc1ccccc12",
    "Oc1ccc2nc3ccccc3cc2c1",
    "C1=Cc2c(O)cccc2C1",
    "Oc1ccc2c(c1)CCc1ccccc1-2",
    "Oc1cc2ccc3cccc4ccc(c1)c2c34",
    "Oc1ccc2cc3c(ccc4ccccc43)cc2c1",
    "Oc1ccc2[nH]ncc2c1",
    "Oc1ccc2ncncc2c1",
    "Oc1ccc2nccnc2c1",
    "Oc1ccc2cnncc2c1",
    "Oc1ccc2nnccc2c1",
    "Oc1ccc2nc3ccccc3nc2c1",
    "Oc1ccc2c(c1)[nH]c1ccccc12",
    "Oc1ccc2c(c1)CCOc1ccccc1-2",
    "Oc1ccc2c(c1)CCSc1ccccc1-2",
    "C1=COc2c(O)cccc2C1",
    "C1=CSc2c(O)cccc2C1",
    "C1=Cc2c(O)cccc2OC1",
    "C1=Cc2c(O)cccc2SC1",
    "CC1CC2=CC=CC3=C2C1=CC=C3",
    "ClC1CC2=CC=CC3=C2C1=CC=C3",
    "O1CC2=CC=CC3=C2C1=CC=C3",
    "N1CC2=CC=CC3=C2C1=CC=C3",
    "S1CC2=CC=CC3=C2C1=CC=C3",
    "Cc1oc2ncccc2c1",
    "Oc1oc2ncccc2c1",
    "Nc1oc2ncccc2c1",
    "N#Cc1oc2ncccc2c1",
    "O=Cc1oc2ncccc2c1",
    "O=C(O)c1oc2ncccc2c1",
    "NC(=O)c1oc2ncccc2c1",
    "CCOC(=O)c1oc2ncccc2c1",
    "O=C(Cl)c1oc2ncccc2c1",
    "O=S(=O)(O)c1oc2ncccc2c1",
    "OP(=O)(O)c1oc2ncccc2c1",
    "OS(=O)(=O)Oc1oc2ncccc2c1",
    "OP(=O)(O)Oc1oc2ncccc2c1",
    "c1oc2ncccc2c1O[N+](=O)[O-]",
    "c1oc2ncccc2c1ON=O",
    "NS(=O)(=O)c1oc2ncccc2c1",
]


@pytest.mark.parametrize("smiles", SMILES)
def test_roundtrip(smiles):
    roundtrip_smiles(smiles)


def test_has_smiles():
    if not SMILES:
        pytest.skip("No SMILES literals found.")
