class DocTestCase(TestCase):
methods:
def __init__(self, test, optionflags=0, setUp=None, tearDown=None, checker=None):
*no docstring available*
arguments:
- self: <UNKNOWN>
- test: <UNKNOWN>
- optionflags: <UNKNOWN>
- setUp: <UNKNOWN>
- tearDown: <UNKNOWN>
- checker: <UNKNOWN>
return value:
<UNKNOWN>
source: compat/doctest.py
2112 |
2113 |
2114 |
2115 |
2116 |
2117 |
2118 |
2119 |
2120 | |
def __init__(self, test, optionflags=0, setUp=None, tearDown=None, |
checker=None): |
|
unittest.TestCase.__init__(self) |
self._dt_optionflags = optionflags |
self._dt_checker = checker |
self._dt_test = test |
self._dt_setUp = setUp |
self._dt_tearDown = tearDown | |
def failUnlessAlmostEqual(self, first, second, places=7, msg=None):
Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
arguments:
- self: <UNKNOWN>
- first: <UNKNOWN>
- second: <UNKNOWN>
- places: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 | |
def failUnlessAlmostEqual(self, first, second, places=7, msg=None): |
"""Fail if the two objects are unequal as determined by their |
difference rounded to the given number of decimal places |
(default 7) and comparing to zero. |
|
Note that decimal places (from zero) are usually not the same |
as significant digits (measured from the most signficant digit). |
""" |
if round(abs(second-first), places) != 0: |
raise self.failureException, \ |
(msg or '%r != %r within %r places' % (first, second, places)) | |
def failUnlessAlmostEqual(self, first, second, places=7, msg=None):
Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
arguments:
- self: <UNKNOWN>
- first: <UNKNOWN>
- second: <UNKNOWN>
- places: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 | |
def failUnlessAlmostEqual(self, first, second, places=7, msg=None): |
"""Fail if the two objects are unequal as determined by their |
difference rounded to the given number of decimal places |
(default 7) and comparing to zero. |
|
Note that decimal places (from zero) are usually not the same |
as significant digits (measured from the most signficant digit). |
""" |
if round(abs(second-first), places) != 0: |
raise self.failureException, \ |
(msg or '%r != %r within %r places' % (first, second, places)) | |
def failUnlessEqual(self, first, second, msg=None):
Fail if the two objects are unequal as determined by the '=='
operator.
arguments:
- self: <UNKNOWN>
- first: <UNKNOWN>
- second: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
345 |
346 |
347 |
348 |
349 |
350 |
351 | |
def failUnlessEqual(self, first, second, msg=None): |
"""Fail if the two objects are unequal as determined by the '==' |
operator. |
""" |
if not first == second: |
raise self.failureException, \ |
(msg or '%r != %r' % (first, second)) | |
def failUnlessEqual(self, first, second, msg=None):
Fail if the two objects are unequal as determined by the '=='
operator.
arguments:
- self: <UNKNOWN>
- first: <UNKNOWN>
- second: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
345 |
346 |
347 |
348 |
349 |
350 |
351 | |
def failUnlessEqual(self, first, second, msg=None): |
"""Fail if the two objects are unequal as determined by the '==' |
operator. |
""" |
if not first == second: |
raise self.failureException, \ |
(msg or '%r != %r' % (first, second)) | |
def failIf(self, expr, msg=None):
Fail the test if the expression is true.
arguments:
- self: <UNKNOWN>
- expr: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
|
def failIf(self, expr, msg=None): |
"Fail the test if the expression is true." |
if expr: raise self.failureException, msg | |
def failIfAlmostEqual(self, first, second, places=7, msg=None):
Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
arguments:
- self: <UNKNOWN>
- first: <UNKNOWN>
- second: <UNKNOWN>
- places: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 | |
def failIfAlmostEqual(self, first, second, places=7, msg=None): |
"""Fail if the two objects are equal as determined by their |
difference rounded to the given number of decimal places |
(default 7) and comparing to zero. |
|
Note that decimal places (from zero) are usually not the same |
as significant digits (measured from the most signficant digit). |
""" |
if round(abs(second-first), places) == 0: |
raise self.failureException, \ |
(msg or '%r == %r within %r places' % (first, second, places)) | |
def failIfAlmostEqual(self, first, second, places=7, msg=None):
Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
arguments:
- self: <UNKNOWN>
- first: <UNKNOWN>
- second: <UNKNOWN>
- places: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 | |
def failIfAlmostEqual(self, first, second, places=7, msg=None): |
"""Fail if the two objects are equal as determined by their |
difference rounded to the given number of decimal places |
(default 7) and comparing to zero. |
|
Note that decimal places (from zero) are usually not the same |
as significant digits (measured from the most signficant digit). |
""" |
if round(abs(second-first), places) == 0: |
raise self.failureException, \ |
(msg or '%r == %r within %r places' % (first, second, places)) | |
def failIfEqual(self, first, second, msg=None):
Fail if the two objects are equal as determined by the '=='
operator.
arguments:
- self: <UNKNOWN>
- first: <UNKNOWN>
- second: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
353 |
354 |
355 |
356 |
357 |
358 |
359 | |
def failIfEqual(self, first, second, msg=None): |
"""Fail if the two objects are equal as determined by the '==' |
operator. |
""" |
if first == second: |
raise self.failureException, \ |
(msg or '%r == %r' % (first, second)) | |
def failIfEqual(self, first, second, msg=None):
Fail if the two objects are equal as determined by the '=='
operator.
arguments:
- self: <UNKNOWN>
- first: <UNKNOWN>
- second: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
353 |
354 |
355 |
356 |
357 |
358 |
359 | |
def failIfEqual(self, first, second, msg=None): |
"""Fail if the two objects are equal as determined by the '==' |
operator. |
""" |
if first == second: |
raise self.failureException, \ |
(msg or '%r == %r' % (first, second)) | |
def failUnlessRaises(self, excClass, callableObj, *args, **kwargs):
Fail unless an exception of class excClass is thrown
by callableObj when invoked with arguments args and keyword
arguments kwargs. If a different type of exception is
thrown, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.
arguments:
- self: <UNKNOWN>
- excClass: <UNKNOWN>
- callableObj: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 | |
def failUnlessRaises(self, excClass, callableObj, *args, **kwargs): |
"""Fail unless an exception of class excClass is thrown |
by callableObj when invoked with arguments args and keyword |
arguments kwargs. If a different type of exception is |
thrown, it will not be caught, and the test case will be |
deemed to have suffered an error, exactly as for an |
unexpected exception. |
""" |
try: |
callableObj(*args, **kwargs) |
except excClass: |
return |
else: |
if hasattr(excClass,'__name__'): excName = excClass.__name__ |
else: excName = str(excClass) |
raise self.failureException, "%s not raised" % excName | |
def failUnless(self, expr, msg=None):
Fail the test unless the expression is true.
arguments:
- self: <UNKNOWN>
- expr: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
|
def failUnless(self, expr, msg=None): |
"""Fail the test unless the expression is true.""" |
if not expr: raise self.failureException, msg | |
def failUnless(self, expr, msg=None):
Fail the test unless the expression is true.
arguments:
- self: <UNKNOWN>
- expr: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
|
def failUnless(self, expr, msg=None): |
"""Fail the test unless the expression is true.""" |
if not expr: raise self.failureException, msg | |
def countTestCases(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
|
def countTestCases(self): |
return 1 | |
def debug(self):
Run the test case without results and without catching exceptions
The unit test framework includes a debug method on test cases
and test suites to support post-mortem debugging. The test code
is run in such a way that errors are not caught. This way a
caller can catch the errors and initiate post-mortem debugging.
The DocTestCase provides a debug method that raises
UnexpectedException errors if there is an unexepcted
exception:
>>> test = DocTestParser().get_doctest('>>> raise KeyError\n42',
... {}, 'foo', 'foo.py', 0)
>>> case = DocTestCase(test)
>>> try:
... case.debug()
... except UnexpectedException, failure:
... pass
The UnexpectedException contains the test, the example, and
the original exception:
>>> failure.test is test
True
>>> failure.example.want
'42\n'
>>> exc_info = failure.exc_info
>>> raise exc_info[0], exc_info[1], exc_info[2]
Traceback (most recent call last):
...
KeyError
If the output doesn't match, then a DocTestFailure is raised:
>>> test = DocTestParser().get_doctest('''
... >>> x = 1
... >>> x
... 2
... ''', {}, 'foo', 'foo.py', 0)
>>> case = DocTestCase(test)
>>> try:
... case.debug()
... except DocTestFailure, failure:
... pass
DocTestFailure objects provide access to the test:
>>> failure.test is test
True
As well as to the example:
>>> failure.example.want
'2\n'
and the actual output:
>>> failure.got
'1\n'
arguments:
return value:
<UNKNOWN>
source: compat/doctest.py
2172 |
2173 |
2174 |
2175 |
2176 |
2177 |
2178 |
2179 |
2180 |
2181 |
2182 |
2183 |
2184 |
2185 |
2186 |
2187 |
2188 |
2189 |
2190 |
2191 |
2192 |
2193 |
2194 |
2195 |
2196 |
2197 |
2198 |
2199 |
2200 |
2201 |
2202 |
2203 |
2204 |
2205 |
2206 |
2207 |
2208 |
2209 |
2210 |
2211 |
2212 |
2213 |
2214 |
2215 |
2216 |
2217 |
2218 |
2219 |
2220 |
2221 |
2222 |
2223 |
2224 |
2225 |
2226 |
2227 |
2228 |
2229 |
2230 |
2231 |
2232 |
2233 |
2234 |
2235 |
2236 |
2237 |
2238 |
2239 |
2240 |
2241 |
2242 | |
def debug(self): |
r"""Run the test case without results and without catching exceptions |
|
The unit test framework includes a debug method on test cases |
and test suites to support post-mortem debugging. The test code |
is run in such a way that errors are not caught. This way a |
caller can catch the errors and initiate post-mortem debugging. |
|
The DocTestCase provides a debug method that raises |
UnexpectedException errors if there is an unexepcted |
exception: |
|
>>> test = DocTestParser().get_doctest('>>> raise KeyError\n42', |
... {}, 'foo', 'foo.py', 0) |
>>> case = DocTestCase(test) |
>>> try: |
... case.debug() |
... except UnexpectedException, failure: |
... pass |
|
The UnexpectedException contains the test, the example, and |
the original exception: |
|
>>> failure.test is test |
True |
|
>>> failure.example.want |
'42\n' |
|
>>> exc_info = failure.exc_info |
>>> raise exc_info[0], exc_info[1], exc_info[2] |
Traceback (most recent call last): |
... |
KeyError |
|
If the output doesn't match, then a DocTestFailure is raised: |
|
>>> test = DocTestParser().get_doctest(''' |
... >>> x = 1 |
... >>> x |
... 2 |
... ''', {}, 'foo', 'foo.py', 0) |
>>> case = DocTestCase(test) |
|
>>> try: |
... case.debug() |
... except DocTestFailure, failure: |
... pass |
|
DocTestFailure objects provide access to the test: |
|
>>> failure.test is test |
True |
|
As well as to the example: |
|
>>> failure.example.want |
'2\n' |
|
and the actual output: |
|
>>> failure.got |
'1\n' |
|
""" |
|
self.setUp() |
runner = DebugRunner(optionflags=self._dt_optionflags, |
checker=self._dt_checker, verbose=False) |
runner.run(self._dt_test) |
self.tearDown() | |
def defaultTestResult(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
|
def defaultTestResult(self): |
return TestResult() | |
def fail(self, msg=None):
Fail immediately, with the given message.
arguments:
- self: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
|
def fail(self, msg=None): |
"""Fail immediately, with the given message.""" |
raise self.failureException, msg | |
def failIf(self, expr, msg=None):
Fail the test if the expression is true.
arguments:
- self: <UNKNOWN>
- expr: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
|
def failIf(self, expr, msg=None): |
"Fail the test if the expression is true." |
if expr: raise self.failureException, msg | |
def failIfAlmostEqual(self, first, second, places=7, msg=None):
Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
arguments:
- self: <UNKNOWN>
- first: <UNKNOWN>
- second: <UNKNOWN>
- places: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 | |
def failIfAlmostEqual(self, first, second, places=7, msg=None): |
"""Fail if the two objects are equal as determined by their |
difference rounded to the given number of decimal places |
(default 7) and comparing to zero. |
|
Note that decimal places (from zero) are usually not the same |
as significant digits (measured from the most signficant digit). |
""" |
if round(abs(second-first), places) == 0: |
raise self.failureException, \ |
(msg or '%r == %r within %r places' % (first, second, places)) | |
def failIfEqual(self, first, second, msg=None):
Fail if the two objects are equal as determined by the '=='
operator.
arguments:
- self: <UNKNOWN>
- first: <UNKNOWN>
- second: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
353 |
354 |
355 |
356 |
357 |
358 |
359 | |
def failIfEqual(self, first, second, msg=None): |
"""Fail if the two objects are equal as determined by the '==' |
operator. |
""" |
if first == second: |
raise self.failureException, \ |
(msg or '%r == %r' % (first, second)) | |
def failUnless(self, expr, msg=None):
Fail the test unless the expression is true.
arguments:
- self: <UNKNOWN>
- expr: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
|
def failUnless(self, expr, msg=None): |
"""Fail the test unless the expression is true.""" |
if not expr: raise self.failureException, msg | |
def failUnlessAlmostEqual(self, first, second, places=7, msg=None):
Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
arguments:
- self: <UNKNOWN>
- first: <UNKNOWN>
- second: <UNKNOWN>
- places: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 | |
def failUnlessAlmostEqual(self, first, second, places=7, msg=None): |
"""Fail if the two objects are unequal as determined by their |
difference rounded to the given number of decimal places |
(default 7) and comparing to zero. |
|
Note that decimal places (from zero) are usually not the same |
as significant digits (measured from the most signficant digit). |
""" |
if round(abs(second-first), places) != 0: |
raise self.failureException, \ |
(msg or '%r != %r within %r places' % (first, second, places)) | |
def failUnlessEqual(self, first, second, msg=None):
Fail if the two objects are unequal as determined by the '=='
operator.
arguments:
- self: <UNKNOWN>
- first: <UNKNOWN>
- second: <UNKNOWN>
- msg: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
345 |
346 |
347 |
348 |
349 |
350 |
351 | |
def failUnlessEqual(self, first, second, msg=None): |
"""Fail if the two objects are unequal as determined by the '==' |
operator. |
""" |
if not first == second: |
raise self.failureException, \ |
(msg or '%r != %r' % (first, second)) | |
def failUnlessRaises(self, excClass, callableObj, *args, **kwargs):
Fail unless an exception of class excClass is thrown
by callableObj when invoked with arguments args and keyword
arguments kwargs. If a different type of exception is
thrown, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.
arguments:
- self: <UNKNOWN>
- excClass: <UNKNOWN>
- callableObj: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 | |
def failUnlessRaises(self, excClass, callableObj, *args, **kwargs): |
"""Fail unless an exception of class excClass is thrown |
by callableObj when invoked with arguments args and keyword |
arguments kwargs. If a different type of exception is |
thrown, it will not be caught, and the test case will be |
deemed to have suffered an error, exactly as for an |
unexpected exception. |
""" |
try: |
callableObj(*args, **kwargs) |
except excClass: |
return |
else: |
if hasattr(excClass,'__name__'): excName = excClass.__name__ |
else: excName = str(excClass) |
raise self.failureException, "%s not raised" % excName | |
def format_failure(self, err):
def id(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
def run(self, result=None):
*no docstring available*
arguments:
- self: <UNKNOWN>
- result: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 | |
def run(self, result=None): |
if result is None: result = self.defaultTestResult() |
result.startTest(self) |
testMethod = getattr(self, self._testMethodName) |
try: |
try: |
self.setUp() |
except KeyboardInterrupt: |
raise |
except: |
result.addError(self, self._exc_info()) |
return |
|
ok = False |
try: |
testMethod() |
ok = True |
except self.failureException: |
result.addFailure(self, self._exc_info()) |
except KeyboardInterrupt: |
raise |
except: |
result.addError(self, self._exc_info()) |
|
try: |
self.tearDown() |
except KeyboardInterrupt: |
raise |
except: |
result.addError(self, self._exc_info()) |
ok = False |
if ok: result.addSuccess(self) |
finally: |
result.stopTest(self) | |
def runTest(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
source: compat/doctest.py
2136 |
2137 |
2138 |
2139 |
2140 |
2141 |
2142 |
2143 |
2144 |
2145 |
2146 |
2147 |
2148 |
2149 |
2150 |
2151 |
2152 |
2153 |
2154 |
2155 |
2156 |
2157 |
2158 | |
def runTest(self): |
test = self._dt_test |
old = sys.stdout |
new = StringIO() |
optionflags = self._dt_optionflags |
|
if not (optionflags & REPORTING_FLAGS): |
|
|
optionflags |= _unittest_reportflags |
|
runner = DocTestRunner(optionflags=optionflags, |
checker=self._dt_checker, verbose=False) |
|
try: |
runner.DIVIDER = "-"*70 |
failures, tries = runner.run( |
test, out=new.write, clear_globs=False) |
finally: |
sys.stdout = old |
|
if failures: |
raise self.failureException(self.format_failure(new.getvalue())) | |
def setUp(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
def shortDescription(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
def tearDown(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
source: compat/doctest.py
2128 |
2129 |
2130 |
2131 |
2132 |
2133 |
2134 | |
def tearDown(self): |
test = self._dt_test |
|
if self._dt_tearDown is not None: |
self._dt_tearDown(test) |
|
test.globs.clear() | |
def __call__(self, *args, **kwds):
*no docstring available*
arguments:
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
|
def __call__(self, *args, **kwds): |
return self.run(*args, **kwds) | |
def __eq__(self, other):
*no docstring available*
arguments:
- self: <UNKNOWN>
- other: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
|
def __eq__(self, other): |
if type(self) is not type(other): |
return False |
|
return self._testMethodName == other._testMethodName | |
def __hash__(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
|
def __hash__(self): |
return hash((type(self), self._testMethodName)) | |
def __ne__(self, other):
*no docstring available*
arguments:
- self: <UNKNOWN>
- other: <UNKNOWN>
return value:
<UNKNOWN>
source: /usr/lib/python2.6/unittest.py
|
def __ne__(self, other): |
return not self == other | |
def __repr__(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
source: compat/doctest.py
|
def __repr__(self): |
name = self._dt_test.name.split('.') |
return "%s (%s)" % (name[-1], '.'.join(name[:-1])) | |
def __repr__(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
source: compat/doctest.py
|
def __repr__(self): |
name = self._dt_test.name.split('.') |
return "%s (%s)" % (name[-1], '.'.join(name[:-1])) | |