Closed KasperFranz closed 5 months ago
what happens when one of them IS nonexisting? Maybe it would be better to skip this test entirely with multiple brands or split earlier, so report about nonexisting brand will actually report problematic one not merged list of them?
what happens when one of them IS nonexisting? Maybe it would be better to skip this test entirely with multiple brands or split earlier, so report about nonexisting brand will actually report problematic one not merged list of them?
With this PR, it would report the brand as nonexisting if 1 of them are invalid - I am not sure how it would look in the report, I will create a quick test case for it to see output
@matkoniecz do you have an example of P576 with P1011?
I would like to add a test case to ensure it is covered
@KasperFranz https://www.wikidata.org/wiki/User:Mateusz_Konieczny/failing_testcases#Still_existing_brand should have some
(more tests are always welcome, I try to add them but more tested cases is always nice)
I have changed the underlying function to return the dissolved brands instead, and it is now reporting the error on the invalid wikidata IDs.
Let me know if you want to adjust the error :)
Thanks! And in a bit unlikely case of looking for more coding tasks: test suite has some failing tests where bug was found but is not yet fixed. Some may be even fixable in reasonable way.
Hmmmm, I see
======================================================================
FAIL: test_that_wikidata_works_with_multiple_brands_one_invalid (test_wikimedia_link_issue_reporter.Tests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/mateusz/Documents/install_moje/OSM_software/wikibrain_py_package_published/test_wikimedia_link_issue_reporter.py", line 490, in test_that_wikidata_works_with_multiple_brands_one_invalid
self.assertIsNone(should_be_fine)
AssertionError: <wikibrain.wikimedia_link_issue_reporter.ErrorReport object at 0x7f24aa898d90> is not None
Given that https://www.wikidata.org/wiki/Q7501155 is actually defunct, it should not be None, right? And if one would be invalid then error should be still emitted?
Let me review it again - thank you for flagging
This PR showcases the bug #4 and fixes #4