Sure, but it will take some changes to the parser. Currently the #long tag only affects whether the test is added to the list of tests to be run. Once that has been decided, the fact that a test was marked with #long is currently not stored anywhere. The place you'll need to change is line 566 of sage/doctest/parsing.py, where you'll need to do something like if 'long time' in optional_tags: if self.long: optional_tags.remove('long time') item.long = True else: continue else: item.long = False
You'd then need to change the warn_long option from being a float to a pair, then line 541 of sage/doctest/forker.py to have cases based on whether the example has been marked as long or not. David On Tue, Mar 21, 2017 at 3:34 AM, Jori Mäntysalo <jori.mantys...@uta.fi> wrote: > Is it possible to modify doctesting framework to have different time for > tests marked with # long time? Something like sage --warn-long 1,10 could > give warning for only doctests taking more than 10 seconds if they are > explicitly marked as slow. > > -- > Jori Mäntysalo > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.