allow for simplified test data structures
Instead of a strict list of (URL, RESULTS)-tuples, extractor result tests can now be a single (URL, RESULTS)-tuple, if it's just one test, and "only matching" tests can now be a simple string.
This commit is contained in:
@@ -255,8 +255,9 @@ def main():
|
||||
print(extr.__doc__)
|
||||
print("Category:", extr.category,
|
||||
"- Subcategory:", extr.subcategory)
|
||||
if hasattr(extr, "test") and extr.test:
|
||||
print("Example :", extr.test[0][0])
|
||||
test = next(extr._get_tests(), None)
|
||||
if test:
|
||||
print("Example :", test[0])
|
||||
print()
|
||||
else:
|
||||
if not args.urls and not args.inputfile:
|
||||
|
||||
Reference in New Issue
Block a user