HomePhabricator

Add unit tests for get_grouping_information

Authored by JeanFred on Oct 15 2019, 9:12 PM.

Description

Add unit tests for get_grouping_information

Add unit tests covering get_grouping_information in three use cases:

  • Default case
  • With higher-grouping set
  • With a custom grouping_threshold
  • With an empty query result set, raising an exception

The tests rely on the mocked pywikibot SparqlQuery engine,
and patch the return value of the select method.

The assertions are on the SPARQL query generated,
and on the final data structures returned.

Details

Committed
JeanFredOct 15 2019, 9:14 PM
Parents
R2566:7bbe6ad963b2: Fix ordering of OrderedDict in PropertyStatisticsTest
Branches
Unknown
Tags
Unknown
ChangeId
None