Allow a season method with sources, where the pages differ
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cb6cdadd41
commit
667b2ea00f
4 files changed
+27
-6
No files matched your search
@@ -80,6 +80,20 @@ class SeasonBasisTest(unittest.TestCase):
|
||||
same = [src("Park Service"), src("Park Service", url="https://example.org/b")]
|
||||
self.assertEqual(check(season_basis="source", source=same), [])
|
||||
|
||||
def test_method_is_allowed_with_sources_only_besides_estimate(self):
|
||||
two = [src("Park Service"), src("Blog", url="https://example.org/b")]
|
||||
ok = check(season_basis="sources", source=two,
|
||||
season_method="The pages differ; set from both and the climate estimate.")
|
||||
self.assertEqual(ok, [])
|
||||
self.assertEqual(check(season_basis="sources", source=two), [])
|
||||
for basis in ("primary", "source"):
|
||||
errors = check(season_basis=basis, season_method="Some sentence.")
|
||||
self.assertTrue(any("season_method" in e for e in errors), (basis, errors))
|
||||
long = check(season_basis="sources", source=two, season_method="x" * 401)
|
||||
self.assertTrue(any("400" in e for e in long), long)
|
||||
blank = check(season_basis="sources", source=two, season_method=" ")
|
||||
self.assertTrue(any("season_method" in e for e in blank), blank)
|
||||
|
||||
def test_primary_needs_a_naming_source(self):
|
||||
errors = check(source=[src("Park Service", facts=("days",))])
|
||||
self.assertTrue(errors)
|
||||
|
||||
Reference in new issue
Block a user