pyld icon indicating copy to clipboard operation
pyld copied to clipboard

Fixed bugs in embed and remote frame context handling.

Open RDProjekt opened this issue 10 years ago • 2 comments

Hi!

We noticed two bugs in your code. One is in the framing algorithm when the remote frame contains a context url (the "if" was never True and if/else branches were reversed), and the other is in the _remove_embed function (lack of "enumerate" while iterating embed['parent']).

Here's a pull request with patches. We also added some unit-tests for the first bug. Because json-ld-org tests don't cover it, we had to come up with our own.

Best regards, RD Projekt

RDProjekt avatar Jul 24 '14 14:07 RDProjekt

Thanks @RDProjekt! We need to take a closer look at this when we can, but it does look like we want to pull it in. We do need to get generic unit tests (that aren't just the official JSON-LD test suite) working and running in travis so we can throw more in there as needed and this could be a good start for that. We'd like, at least eventually, all of the tests (official JSON-LD test suite and our own custom ones) to run at the same time.

dlongley avatar Jul 30 '14 17:07 dlongley

It would be good to try and get these tests into the main test suite. We want to be able test all implementations for these issues.

davidlehn avatar Jul 30 '14 17:07 davidlehn