【发布时间】:2014-07-30 22:47:27
【问题描述】:
我想运行这个 doctest 并检查输出:
>>> execfile("scss_converter_1.5.1_v1.py") #doctest: +NORMALIZE_WHITESPACE +DONT_ACCEPT_BLANKLINE
body {
.boxholder {
.box {
.col {
.something {
.something.else {
}
}
img {
}
a {
.my.span {
}
}
ul {
.list-item {
}
}
#some-button {
}
}
}
.another-box.crazy.very.insane {
}
}
}
"""
但是当我运行测试时,它说预期的输出是:
Expected:
body {
有什么方法可以让它期望包含所有单词的完整字符串?换行通常意味着预期输出的结束,不是这样,所以很棘手。
干杯
【问题讨论】: