Commit a3671c67 authored by Dag Sverre Seljebotn's avatar Dag Sverre Seljebotn

Rename doctesthack -> autotestdict, and make it default

--HG--
rename : tests/errors/e_doctesthack.pyx => tests/errors/e_autotestdict.pyx
rename : tests/run/doctesthack.pyx => tests/run/autotestdict.pyx
rename : tests/run/doctesthack_skip.pyx => tests/run/autotestdict_skip.pyx
parent 3f00253b
......@@ -7,13 +7,13 @@ from Builtin import dict_type
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
......
......@@ -88,7 +88,7 @@ class Context(object):
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
......@@ -127,7 +127,7 @@ class Context(object):
WithTransform(self),
DecoratorTransform(self),
AnalyseDeclarationsTransform(self),
DoctestHackTransform(self),
AutoTestDictTransform(self),
EmbedSignature(self),
TransformBuiltinMethods(self),
IntroduceBufferAuxiliaryVars(self),
......
......@@ -68,7 +68,7 @@ option_defaults = {
'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
......@@ -80,7 +80,7 @@ for key, val in option_defaults.items():
option_scopes = { # defaults to available everywhere
# 'module', 'function', 'class', 'with statement'
'doctesthack' : ('module',)
'autotestdict' : ('module',)
}
def parse_option_value(name, value):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment