<s> import sys <EOL> import os <EOL> import glob <EOL> import doctest <EOL> import unittest <EOL> testdir = os . path . dirname ( __file__ ) <EOL> doctestflags = ( <EOL> doctest . DONT_ACCEPT_TRUE_FOR_1 <EOL> | doctest . ELLIPSIS <EOL> | doctest . REPORT_ONLY_FIRST_FAILURE <EOL> ) <EOL> def load_tests ( loader , tests , pattern ) : <EOL> '''<STR_LIT>''' <EOL> tests . addTests ( doctest . DocFileSuite ( <EOL> * find_tests ( testdir ) , <EOL> module_relative = False , <EOL> optionflags = doctestflags <EOL> ) ) <EOL> return tests <EOL> def find_tests ( testdir ) : <EOL> return sorted ( glob . glob ( os . path . join ( testdir , '<STR_LIT>' ) ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> sys . path . insert ( <NUM_LIT:0> , os . getcwd ( ) ) <EOL> unittest . main ( ) </s>
