fails tests with python 3.6

Bug #1699009 reported by Michael Hudson-Doyle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Sergio Schvezov
snapcraft (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Like so:

======================================================================
ERROR: test_parts_build_env_contains_parallel_build_count (snapcraft.tests.test_project_loader.TestYamlEnvironment)
snapcraft.tests.test_project_loader.TestYamlEnvironment.test_parts_build_env_contains_parallel_build_count
----------------------------------------------------------------------
testtools.testresult.real._StringException: Empty attachments:
  pythonlogging:''

Traceback (most recent call last):
  File "/usr/lib/python3.6/unittest/mock.py", line 1179, in patched
    return func(*args, **keywargs)
  File "/<<BUILDDIR>>/snapcraft-2.31+17.10.1/snapcraft/tests/test_project_loader.py", line 1791, in test_parts_build_env_contains_parallel_build_count
    config = project_loader.Config()
  File "/<<BUILDDIR>>/snapcraft-2.31+17.10.1/snapcraft/internal/project_loader.py", line 118, in __init__
    self._snapcraft_yaml)
  File "/<<BUILDDIR>>/snapcraft-2.31+17.10.1/snapcraft/internal/parts.py", line 158, in __init__
    self._process_parts()
  File "/<<BUILDDIR>>/snapcraft-2.31+17.10.1/snapcraft/internal/parts.py", line 188, in _process_parts
    self.load_plugin(part_name, plugin_name, properties)
  File "/<<BUILDDIR>>/snapcraft-2.31+17.10.1/snapcraft/internal/parts.py", line 266, in load_plugin
    definitions_schema=self._validator.definitions_schema)
  File "/<<BUILDDIR>>/snapcraft-2.31+17.10.1/snapcraft/internal/pluginhandler/__init__.py", line 833, in load_plugin
    definitions_schema=definitions_schema)
  File "/<<BUILDDIR>>/snapcraft-2.31+17.10.1/snapcraft/internal/pluginhandler/__init__.py", line 87, in __init__
    self.ubuntudir = os.path.join(parts_dir, part_name, 'ubuntu')
  File "/usr/lib/python3.6/posixpath.py", line 78, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not MagicMock

======================================================================
FAIL: test_wait_for_network_loops (snapcraft.tests.test_lxd.LXDTestCase)
snapcraft.tests.test_lxd.LXDTestCase.test_wait_for_network_loops (local)
----------------------------------------------------------------------
testtools.testresult.real._StringException: Empty attachments:
  pythonlogging:''

Traceback (most recent call last):
  File "/<<BUILDDIR>>/snapcraft-2.31+17.10.1/snapcraft/tests/test_lxd.py", line 122, in test_wait_for_network_loops
    "Command '['my-cmd']' returned non-zero exit status -1")
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = "Command '['my-cmd']' died with <Signals.SIGHUP: 1>."
actual = "Command '['my-cmd']' returned non-zero exit status -1"

======================================================================
FAIL: test_wait_for_network_loops (snapcraft.tests.test_lxd.LXDTestCase)
snapcraft.tests.test_lxd.LXDTestCase.test_wait_for_network_loops (remote)
----------------------------------------------------------------------
testtools.testresult.real._StringException: Empty attachments:
  pythonlogging:''

traceback-1: {{{
Traceback (most recent call last):
  File "/<<BUILDDIR>>/snapcraft-2.31+17.10.1/snapcraft/tests/test_lxd.py", line 122, in test_wait_for_network_loops
    "Command '['my-cmd']' returned non-zero exit status -1")
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = "Command '['my-cmd']' died with <Signals.SIGHUP: 1>."
actual = "Command '['my-cmd']' returned non-zero exit status -1"
}}}

======================================================================
FAIL: test_wait_for_network_loops (snapcraft.tests.test_lxd.LXDTestCase)
snapcraft.tests.test_lxd.LXDTestCase.test_wait_for_network_loops (cross)
----------------------------------------------------------------------
testtools.testresult.real._StringException: Empty attachments:
  pythonlogging:''

traceback-2: {{{
Traceback (most recent call last):
  File "/<<BUILDDIR>>/snapcraft-2.31+17.10.1/snapcraft/tests/test_lxd.py", line 122, in test_wait_for_network_loops
    "Command '['my-cmd']' returned non-zero exit status -1")
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = "Command '['my-cmd']' died with <Signals.SIGHUP: 1>."
actual = "Command '['my-cmd']' returned non-zero exit status -1"
}}}

You'll need to fix this to get the next version into artful.

tags: added: ftbfs python3.6
Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Sergio Schvezov (sergiusens)
milestone: none → 2.33
Changed in snapcraft:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package snapcraft - 2.33+17.10

---------------
snapcraft (2.33+17.10) artful; urgency=medium

  [ Sergio Schvezov ]
  * tests: reduce the amount of test code in test_meta (#1391)
  * meta: bash completion support (#1390)
  * tests: fix issues with python 3.6 (#1398) (LP: #1699009)
  * cleanbuild: ensure we enter a shell on failures on --debug (#1404)
  * tests: do not break a systems `bzr whoami` (#1357)
  * snap: remove completer entry (#1409)
  * core: minimal cross OS support. (#1413)
  * core: a clean command should clean. (#1416)
  * nodejs plugin: copy the content of out of tree symlinks (#1418)
  * tests: adapt opencv's test expectations (#1426)
  * New upstream release (LP: #1707060)

  [ Zygmunt Krynicki ]
  * pluginhandler: don't clobber path on local import failure (#1361)

  [ Paolo Pisati ]
  * core: use the correct kernel arch for s390 (#1376)

  [ Tim Süberkrüb ]
  * core: support yaml merge tags (#1384)

  [ roxd ]
  * schema: blank version should not be allowed in snapcraft.yaml (#1379)

  [ Paolo Pisati ]
  * kernel plugin: add a default target per powerpc, ppc64el and s390x (#1377)

  [ Rex Tsai ]
  * tests: mock download for rustup in the x-compile test. (#1396)

  [ Evan Dandrea ]
  * file_utils: handle I/O errors in os.link (#1369)
  * python plugin: correct capitalisation for PyPI. (#1401)
  * python plugin: better explain dependency link processing (#1402)

  [ Leo Arias ]
  * python plugin: output json in pip list (#1393)
  * tests: allow to filter tests in docker (#1375)
  * tests: document the test suites in the snapcraft repo (#1394)
  * recording: rename the file to manifest.yaml (#1406)
  * pluginhandler: check for collisions only in existing files (#1405)
  * tests: run the tests in travis using LXD containers (#1415)
  * tests: build the snapcraft snap in travis tests (#1411)
  * ci: remove the old script to run with lxc (#1422)

  [ Christian Dywan ]
  * cli: proper parsing of hidden options (#1378)
  * core: clean the container on a full clean (#1372)
  * lxd: do not assume user ID of 1000 for raw.idmap (#1385)
  * autotools plugin: Enable cross-compilation support (#1383)
  * lxd: distingish FileNotFoundError for when not installed (#1400)
  * waf plugin: enable cross-compilation support (#1397)
  * ci: wait for apt/dpkg lock when setting lxd up (#1421)
  * lxd: stop setting `$HOME` in containers (#1408)
  * lxd: only remove container if one exists (#1403)

  [ Simon Davy ]
  * meta: add support for `reload-command` (#1373)

 -- Sergio Schvezov <email address hidden> Thu, 27 Jul 2017 20:19:01 +0000

Changed in snapcraft (Ubuntu):
status: New → Fix Released
Changed in snapcraft:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.