from StringEncoding import EncodedString
import Naming
-class DoctestHackTransform(ScopeTrackingTransform):
- # Handles doctesthack directive
+class AutoTestDictTransform(ScopeTrackingTransform):
+ # Handles autotestdict directive
def visit_ModuleNode(self, node):
self.scope_type = 'module'
self.scope_node = node
- if self.current_directives['doctesthack']:
+ if self.current_directives['autotestdict']:
assert isinstance(node.body, StatListNode)
# First see if __test__ is already created
from ParseTreeTransforms import CreateClosureClasses, MarkClosureVisitor, DecoratorTransform
from ParseTreeTransforms import InterpretCompilerDirectives, TransformBuiltinMethods
from ParseTreeTransforms import AlignFunctionDefinitions, GilCheck
- from AnalysedTreeTransforms import DoctestHackTransform
+ from AnalysedTreeTransforms import AutoTestDictTransform
from AutoDocTransforms import EmbedSignature
from Optimize import FlattenInListTransform, SwitchTransform, IterationTransform
from Optimize import OptimizeBuiltinCalls, ConstantFolding, FinalOptimizePhase
WithTransform(self),
DecoratorTransform(self),
AnalyseDeclarationsTransform(self),
- DoctestHackTransform(self),
+ AutoTestDictTransform(self),
EmbedSignature(self),
TransformBuiltinMethods(self),
IntroduceBufferAuxiliaryVars(self),
'c99_complex' : False, # Don't use macro wrappers for complex arith, not sure what to name this...
'callspec' : "",
'profile': False,
- 'doctesthack': False
+ 'autotestdict': True
}
# Override types possibilities above, if needed
option_scopes = { # defaults to available everywhere
# 'module', 'function', 'class', 'with statement'
- 'doctesthack' : ('module',)
+ 'autotestdict' : ('module',)
}
def parse_option_value(name, value):