BjornFJohansson / pydna

Clone with Python! Data structures for double stranded DNA & simulation of homologous recombination, Gibson assembly, cut & paste cloning.
Other
160 stars 39 forks source link

tests/test_module_dseqrecord.py::test_figure fails #198

Closed manulera closed 5 months ago

manulera commented 5 months ago

Hi @BjornFJohansson I don't know why this test fails, it might have to do with the version of the libraries, because for me the output looks identical, it seems to do with those characters that start with \ that are not printed. See my comment on how I could change the test for it to pass.

 # Passes the tests if changed to "Dseqrecord(-18)\n    cgatcgatcG    \ncatg\x1b[48;5;11mgctagctagC\x1b[0mCCGG"
    assert (
        b22.figure()
        == "Dseqrecord(-18)\n    cgatcgatcG    \ncatg\x1b[48;5;11mgctag\x1b[0m\x1b[48;5;11mctagC\x1b[0mCCGG"
    )

https://github.com/BjornFJohansson/pydna/blob/7deba11ec3125ac1f28b38e2cad5cc17b5658ef4/tests/test_module_dseqrecord.py#L1608C1-L1613C6

manulera commented 5 months ago

Ok I figured it out. Before, the old code returned a location that was join{[9:14](-), [4:9](-)}, the current code returns [4:14](-), see #195. I will fix those cases.