##// END OF EJS Templates
py3: add some b'' prefixes in tests/test-extension.t...
Pulkit Goyal -
r39761:be396c86 default
parent child Browse files
Show More
@@ -322,13 +322,13 b' feature.'
322
322
323 $ cat > $TESTTMP/extlibroot/lsub1/lsub2/called.py <<EOF
323 $ cat > $TESTTMP/extlibroot/lsub1/lsub2/called.py <<EOF
324 > def func():
324 > def func():
325 > return "this is extlibroot.lsub1.lsub2.called.func()"
325 > return b"this is extlibroot.lsub1.lsub2.called.func()"
326 > EOF
326 > EOF
327 $ cat > $TESTTMP/extlibroot/lsub1/lsub2/unused.py <<EOF
327 $ cat > $TESTTMP/extlibroot/lsub1/lsub2/unused.py <<EOF
328 > raise Exception("extlibroot.lsub1.lsub2.unused is loaded unintentionally")
328 > raise Exception("extlibroot.lsub1.lsub2.unused is loaded unintentionally")
329 > EOF
329 > EOF
330 $ cat > $TESTTMP/extlibroot/lsub1/lsub2/used.py <<EOF
330 $ cat > $TESTTMP/extlibroot/lsub1/lsub2/used.py <<EOF
331 > detail = "this is extlibroot.lsub1.lsub2.used"
331 > detail = b"this is extlibroot.lsub1.lsub2.used"
332 > EOF
332 > EOF
333
333
334 Setup sub-package of "external library", which causes instantiation of
334 Setup sub-package of "external library", which causes instantiation of
@@ -338,7 +338,7 b' importing with "absolute_import" feature'
338
338
339 $ mkdir -p $TESTTMP/extlibroot/recursedown/abs
339 $ mkdir -p $TESTTMP/extlibroot/recursedown/abs
340 $ cat > $TESTTMP/extlibroot/recursedown/abs/used.py <<EOF
340 $ cat > $TESTTMP/extlibroot/recursedown/abs/used.py <<EOF
341 > detail = "this is extlibroot.recursedown.abs.used"
341 > detail = b"this is extlibroot.recursedown.abs.used"
342 > EOF
342 > EOF
343 $ cat > $TESTTMP/extlibroot/recursedown/abs/__init__.py <<EOF
343 $ cat > $TESTTMP/extlibroot/recursedown/abs/__init__.py <<EOF
344 > from __future__ import absolute_import
344 > from __future__ import absolute_import
@@ -347,7 +347,7 b' importing with "absolute_import" feature'
347
347
348 $ mkdir -p $TESTTMP/extlibroot/recursedown/legacy
348 $ mkdir -p $TESTTMP/extlibroot/recursedown/legacy
349 $ cat > $TESTTMP/extlibroot/recursedown/legacy/used.py <<EOF
349 $ cat > $TESTTMP/extlibroot/recursedown/legacy/used.py <<EOF
350 > detail = "this is extlibroot.recursedown.legacy.used"
350 > detail = b"this is extlibroot.recursedown.legacy.used"
351 > EOF
351 > EOF
352 $ cat > $TESTTMP/extlibroot/recursedown/legacy/__init__.py <<EOF
352 $ cat > $TESTTMP/extlibroot/recursedown/legacy/__init__.py <<EOF
353 > # legacy style (level == -1) import
353 > # legacy style (level == -1) import
@@ -366,7 +366,7 b" the submodule 'used' should be somehow a"
366
366
367 $ mkdir -p $TESTTMP/extlibroot/shadowing
367 $ mkdir -p $TESTTMP/extlibroot/shadowing
368 $ cat > $TESTTMP/extlibroot/shadowing/used.py <<EOF
368 $ cat > $TESTTMP/extlibroot/shadowing/used.py <<EOF
369 > detail = "this is extlibroot.shadowing.used"
369 > detail = b"this is extlibroot.shadowing.used"
370 > EOF
370 > EOF
371 $ cat > $TESTTMP/extlibroot/shadowing/proxied.py <<EOF
371 $ cat > $TESTTMP/extlibroot/shadowing/proxied.py <<EOF
372 > from __future__ import absolute_import
372 > from __future__ import absolute_import
@@ -386,25 +386,25 b' feature.'
386
386
387 $ cat > $TESTTMP/absextroot/xsub1/xsub2/called.py <<EOF
387 $ cat > $TESTTMP/absextroot/xsub1/xsub2/called.py <<EOF
388 > def func():
388 > def func():
389 > return "this is absextroot.xsub1.xsub2.called.func()"
389 > return b"this is absextroot.xsub1.xsub2.called.func()"
390 > EOF
390 > EOF
391 $ cat > $TESTTMP/absextroot/xsub1/xsub2/unused.py <<EOF
391 $ cat > $TESTTMP/absextroot/xsub1/xsub2/unused.py <<EOF
392 > raise Exception("absextroot.xsub1.xsub2.unused is loaded unintentionally")
392 > raise Exception("absextroot.xsub1.xsub2.unused is loaded unintentionally")
393 > EOF
393 > EOF
394 $ cat > $TESTTMP/absextroot/xsub1/xsub2/used.py <<EOF
394 $ cat > $TESTTMP/absextroot/xsub1/xsub2/used.py <<EOF
395 > detail = "this is absextroot.xsub1.xsub2.used"
395 > detail = b"this is absextroot.xsub1.xsub2.used"
396 > EOF
396 > EOF
397
397
398 Setup extension local modules to examine whether demand importing
398 Setup extension local modules to examine whether demand importing
399 works as expected in "level > 1" case.
399 works as expected in "level > 1" case.
400
400
401 $ cat > $TESTTMP/absextroot/relimportee.py <<EOF
401 $ cat > $TESTTMP/absextroot/relimportee.py <<EOF
402 > detail = "this is absextroot.relimportee"
402 > detail = b"this is absextroot.relimportee"
403 > EOF
403 > EOF
404 $ cat > $TESTTMP/absextroot/xsub1/xsub2/relimporter.py <<EOF
404 $ cat > $TESTTMP/absextroot/xsub1/xsub2/relimporter.py <<EOF
405 > from __future__ import absolute_import
405 > from __future__ import absolute_import
406 > from ... import relimportee
406 > from ... import relimportee
407 > detail = "this relimporter imports %r" % (relimportee.detail)
407 > detail = b"this relimporter imports %r" % (relimportee.detail)
408 > EOF
408 > EOF
409
409
410 Setup modules, which actually import extension local modules at
410 Setup modules, which actually import extension local modules at
General Comments 0
You need to be logged in to leave comments. Login now