On 12.05, Klemens Nanni wrote:
> On Sat, May 12, 2018 at 11:33:11AM +0200, Klemens Nanni wrote:
> > On Sat, May 12, 2018 at 10:27:20AM +0200, Ingo Feinerer wrote:
> > > please find attached a port for qrcode, a pure python QR Code generator:
> > > https://github.com/lincolnloop/python-qrcode
> > Looks good, but some tests fail, test.log attached.
> ... here it is.

> running test
> running egg_info
> writing qrcode.egg-info/PKG-INFO
> writing dependency_links to qrcode.egg-info/dependency_links.txt
> writing entry points to qrcode.egg-info/entry_points.txt
> writing requirements to qrcode.egg-info/requires.txt
> writing top-level names to qrcode.egg-info/top_level.txt
> reading manifest file 'qrcode.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> writing manifest file 'qrcode.egg-info/SOURCES.txt'
> running build_ext
> test_bad_factory (qrcode.tests.test_script.ScriptTest) ... ok
> test_factory (qrcode.tests.test_script.ScriptTest) ... ok
> test_isatty (qrcode.tests.test_script.ScriptTest) ... ok
> test_optimize (qrcode.tests.test_script.ScriptTest) ... ok
> test_piped (qrcode.tests.test_script.ScriptTest) ... ok
> test_stdin (qrcode.tests.test_script.ScriptTest) ... ok
> test_stdin_py3_unicodedecodeerror (qrcode.tests.test_script.ScriptTest) ... ok
> test_change (qrcode.tests.test_release.UpdateManpageTests) ... 
> /usr/local/lib/python3.6/re.py:212: FutureWarning: split() requires a 
> non-empty pattern match.
>   return _compile(pattern, flags).split(string, maxsplit)
> ok
> test_invalid_data (qrcode.tests.test_release.UpdateManpageTests) ... FAIL
> test_no_change (qrcode.tests.test_release.UpdateManpageTests) ... FAIL
> test_not_qrcode (qrcode.tests.test_release.UpdateManpageTests) ... ok
> test_add_qrdata (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_basic (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_fit (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_get_matrix (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_get_matrix_border (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_invalid_version (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_large (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_mode_8bit (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_mode_8bit_newline (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_mode_alpha (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_mode_number (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_negative_size_at_construction (qrcode.tests.test_qrcode.QRCodeTests) ... 
> ok
> test_negative_size_at_usage (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_optimize (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_optimize_short (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_optimize_size (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_overflow (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_print_ascii (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_print_ascii_stdout (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_print_tty (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_print_tty_stdout (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_qrcode_bad_factory (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_qrcode_factory (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_qrdata_repr (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_regression_mode_comma (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_render_pil (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_render_pymaging_png (qrcode.tests.test_qrcode.QRCodeTests) ... skipped 
> 'Requires pymaging with PNG support'
> test_render_pymaging_png_bad_kind (qrcode.tests.test_qrcode.QRCodeTests) ... 
> skipped 'Requires pymaging'
> test_render_svg (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_render_svg_fragment (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_render_svg_path (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> test_render_svg_with_background (qrcode.tests.test_qrcode.QRCodeTests) ... ok
> runTest (qrcode.tests.test_qrcode.ShortcutTest) ... ok
> runTest (qrcode.tests.test_example.ExampleTest) ... ok
> pure (unittest.loader._FailedTest) ... ERROR
> 
> ======================================================================
> ERROR: pure (unittest.loader._FailedTest)
> ----------------------------------------------------------------------
> ImportError: Failed to import test module: pure
> Traceback (most recent call last):
>   File "/usr/local/lib/python3.6/unittest/loader.py", line 153, in 
> loadTestsFromName
>     module = __import__(module_name)
>   File "/tmp/pobj/qrcode-6.0/qrcode-6.0/qrcode/image/pure.py", line 1, in 
> <module>
>     from pymaging import Image
> ModuleNotFoundError: No module named 'pymaging'
> 

This one fails because module is missing.  We do not have 
`pymaging` in ports so, either make the test skip (bad) or
port the python module first and include it in TEST_DEPENDS


> 
> ======================================================================
> FAIL: test_invalid_data (qrcode.tests.test_release.UpdateManpageTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/local/lib/python3.6/unittest/mock.py", line 1179, in patched
>     return func(*args, **keywargs)
>   File "/tmp/pobj/qrcode-6.0/qrcode-6.0/qrcode/tests/test_release.py", line 
> 20, in test_invalid_data
>     mock_file.assert_called()
>   File "/usr/local/lib/python3.6/unittest/mock.py", line 786, in assert_called
>     raise AssertionError(msg)
> AssertionError: Expected 'open' to have been called.
> 
> ======================================================================
> FAIL: test_no_change (qrcode.tests.test_release.UpdateManpageTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/local/lib/python3.6/unittest/mock.py", line 1179, in patched
>     return func(*args, **keywargs)
>   File "/tmp/pobj/qrcode-6.0/qrcode-6.0/qrcode/tests/test_release.py", line 
> 31, in test_no_change
>     mock_file.assert_called()
>   File "/usr/local/lib/python3.6/unittest/mock.py", line 786, in assert_called
>     raise AssertionError(msg)
> AssertionError: Expected 'open' to have been called.
> 
> ----------------------------------------------------------------------
> Ran 46 tests in 0.854s
> 
> FAILED (failures=2, errors=1, skipped=2)
> Test failed: <unittest.runner.TextTestResult run=46 errors=1 failures=2>
> no qrcode
> error: Test failed: <unittest.runner.TextTestResult run=46 errors=1 
> failures=2>
> *** Error 1 in . (/usr/ports/lang/python/python.port.mk:197 'do-test': @cd 
> /tmp/pobj/qrcode-6.0/qrcode-6.0 && /usr/bin/env -i CC=cc PYTHONUS...)

Reply via email to