diff --git a/src/sage/categories/hecke_modules.py b/src/sage/categories/hecke_modules.py index a1c12a3f02b..3f97096e1d0 100644 --- a/src/sage/categories/hecke_modules.py +++ b/src/sage/categories/hecke_modules.py @@ -152,12 +152,9 @@ def _Hom_(self, Y, category): class Homsets(HomsetsCategory): """ - .. TODO:: shall there be any additional category structure on Homsets of hecke modules? - TESTS:: - sage: HeckeModules(ZZ).Homsets().super_categories() - [Category of homsets] + sage: TestSuite(HeckeModules(ZZ).Homsets()).run() """ def base_ring(self): @@ -169,5 +166,20 @@ def base_ring(self): """ return self.base_category().base_ring() + def extra_super_categories(self): + """ + TESTS: + + Check that Hom sets of Hecke modules are in the correct + category (see :trac:`17359`):: + + sage: HeckeModules(ZZ).Homsets().super_categories() + [Category of modules over Integer Ring, Category of homsets] + sage: HeckeModules(QQ).Homsets().super_categories() + [Category of vector spaces over Rational Field, Category of homsets] + """ + from sage.categories.modules import Modules + return [Modules(self.base_ring())] + class ParentMethods: pass diff --git a/src/sage/categories/schemes.py b/src/sage/categories/schemes.py index dd5ace46f21..5229fa4ae13 100644 --- a/src/sage/categories/schemes.py +++ b/src/sage/categories/schemes.py @@ -44,6 +44,11 @@ class Schemes(Category): TESTS:: sage: TestSuite(Schemes()).run() + + Check that Hom sets of schemes are in the correct category:: + + sage: Schemes().Homsets().super_categories() + [Category of homsets] """ @staticmethod @@ -145,16 +150,6 @@ def _call_(self, x): raise TypeError("No way to create an object or morphism in %s from %s"%(self, x)) - class Homsets(HomsetsCategory): - """ - TESTS:: - - sage: Schemes().Homsets().super_categories() - [Category of homsets] - - .. TODO:: shall there be any additional category structure on Homsets of hecke modules? - """ - ############################################################# # Schemes over a given base scheme. #############################################################