Skip to content

Instantly share code, notes, and snippets.

@prcutler
Created June 19, 2019 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prcutler/2d2aa67280600f183cd27609b48af4e8 to your computer and use it in GitHub Desktop.
Save prcutler/2d2aa67280600f183cd27609b48af4e8 to your computer and use it in GitHub Desktop.
Pytest failure on Azure Pipelines
2019-06-16T16:38:26.9433546Z ##[section]Starting: pytest
2019-06-16T16:38:26.9437615Z ==============================================================================
2019-06-16T16:38:26.9438013Z Task : Command line
2019-06-16T16:38:26.9438266Z Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2019-06-16T16:38:26.9438471Z Version : 2.151.1
2019-06-16T16:38:26.9439088Z Author : Microsoft Corporation
2019-06-16T16:38:26.9439208Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2019-06-16T16:38:26.9439427Z ==============================================================================
2019-06-16T16:38:27.0736206Z Generating script.
2019-06-16T16:38:27.0755042Z ========================== Starting Command Output ===========================
2019-06-16T16:38:27.0790343Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/490e0850-eca8-4ae8-bdaa-59a2f0ed491d.sh
2019-06-16T16:38:27.4735994Z Requirement already satisfied: pytest in /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages (4.6.2)
2019-06-16T16:38:27.5054617Z Collecting pytest-azurepipelines
2019-06-16T16:38:27.5674861Z Downloading https://files.pythonhosted.org/packages/18/cd/5931a8f4fa228086a2dd0459226c72fee79f4877249859f48a1a5266a8fc/pytest_azurepipelines-0.6.0-py3-none-any.whl
2019-06-16T16:38:27.5847824Z Requirement already satisfied: atomicwrites>=1.0 in /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages (from pytest) (1.3.0)
2019-06-16T16:38:27.5869832Z Requirement already satisfied: importlib-metadata>=0.12 in /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages (from pytest) (0.17)
2019-06-16T16:38:27.5953622Z Requirement already satisfied: packaging in /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages (from pytest) (19.0)
2019-06-16T16:38:27.6012177Z Requirement already satisfied: py>=1.5.0 in /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages (from pytest) (1.8.0)
2019-06-16T16:38:27.6033674Z Requirement already satisfied: six>=1.10.0 in /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages (from pytest) (1.12.0)
2019-06-16T16:38:27.6048303Z Requirement already satisfied: wcwidth in /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages (from pytest) (0.1.7)
2019-06-16T16:38:27.6066756Z Requirement already satisfied: attrs>=17.4.0 in /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages (from pytest) (19.1.0)
2019-06-16T16:38:27.6231892Z Requirement already satisfied: pluggy<1.0,>=0.12 in /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages (from pytest) (0.12.0)
2019-06-16T16:38:27.6288963Z Requirement already satisfied: more-itertools>=4.0.0; python_version > "2.7" in /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages (from pytest) (5.0.0)
2019-06-16T16:38:27.6322920Z Requirement already satisfied: zipp>=0.5 in /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages (from importlib-metadata>=0.12->pytest) (0.5.1)
2019-06-16T16:38:27.6394894Z Requirement already satisfied: pyparsing>=2.0.2 in /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages (from packaging->pytest) (2.4.0)
2019-06-16T16:38:27.8020982Z Installing collected packages: pytest-azurepipelines
2019-06-16T16:38:27.8259463Z Successfully installed pytest-azurepipelines-0.6.0
2019-06-16T16:38:29.8406811Z ============================= test session starts ==============================
2019-06-16T16:38:29.8408090Z platform linux -- Python 3.7.3, pytest-4.6.2, py-1.8.0, pluggy-0.12.0
2019-06-16T16:38:29.8432839Z rootdir: /home/vsts/work/1/s, inifile: pytest.ini, testpaths: silversaucer
2019-06-16T16:38:29.8434220Z plugins: cov-2.7.1, azurepipelines-0.6.0
2019-06-16T16:38:30.1012160Z collected 2 items
2019-06-16T16:38:30.1022953Z
2019-06-16T16:38:30.3757237Z test_passing_view F [ 50%]
2019-06-16T16:38:30.5210234Z Timestamp is not available for one or more testsuites. Total run duration is being calculated as the sum of time durations of detected testsuites
2019-06-16T16:38:30.5749349Z ##[error]2 test(s) failed, 2 test(s) collected.
2019-06-16T16:38:30.5760478Z ##[warning]Coverage XML was not created, skipping upload.
2019-06-16T16:38:30.5761084Z
2019-06-16T16:38:30.5761229Z
2019-06-16T16:38:30.5761367Z =================================== FAILURES ===================================
2019-06-16T16:38:30.5762484Z _________________ TestMyViewSuccessCondition.test_passing_view _________________
2019-06-16T16:38:30.5762756Z
2019-06-16T16:38:30.5763560Z cls = <class 'sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite'>
2019-06-16T16:38:30.5763937Z
2019-06-16T16:38:30.5764149Z @classmethod
2019-06-16T16:38:30.5764371Z def dbapi(cls):
2019-06-16T16:38:30.5764577Z try:
2019-06-16T16:38:30.5764806Z > from pysqlite2 import dbapi2 as sqlite
2019-06-16T16:38:30.5765884Z E ModuleNotFoundError: No module named 'pysqlite2'
2019-06-16T16:38:30.5766244Z
2019-06-16T16:38:30.5766832Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py:338: ModuleNotFoundError
2019-06-16T16:38:30.5767161Z
2019-06-16T16:38:30.5767403Z During handling of the above exception, another exception occurred:
2019-06-16T16:38:30.5767607Z
2019-06-16T16:38:30.5767837Z self = <silversaucer.tests.TestMyViewSuccessCondition testMethod=test_passing_view>
2019-06-16T16:38:30.5768057Z
2019-06-16T16:38:30.5768275Z def setUp(self):
2019-06-16T16:38:30.5768492Z > super(TestMyViewSuccessCondition, self).setUp()
2019-06-16T16:38:30.5768709Z
2019-06-16T16:38:30.5769071Z silversaucer/tests.py:46:
2019-06-16T16:38:30.5769287Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2019-06-16T16:38:30.5769524Z silversaucer/tests.py:17: in setUp
2019-06-16T16:38:30.5769959Z self.config.include('.models')
2019-06-16T16:38:30.5770544Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages/pyramid/config/__init__.py:676: in include
2019-06-16T16:38:30.5770864Z c(configurator)
2019-06-16T16:38:30.5770991Z silversaucer/models/__init__.py:68: in includeme
2019-06-16T16:38:30.5771129Z session_factory = get_session_factory(get_engine(settings))
2019-06-16T16:38:30.5771344Z silversaucer/models/__init__.py:16: in get_engine
2019-06-16T16:38:30.5771475Z return engine_from_config(settings, prefix)
2019-06-16T16:38:30.5772035Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages/sqlalchemy/engine/__init__.py:478: in engine_from_config
2019-06-16T16:38:30.5772310Z return create_engine(url, **options)
2019-06-16T16:38:30.5772809Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages/sqlalchemy/engine/__init__.py:435: in create_engine
2019-06-16T16:38:30.5773072Z return strategy.create(*args, **kwargs)
2019-06-16T16:38:30.5773558Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages/sqlalchemy/engine/strategies.py:87: in create
2019-06-16T16:38:30.5773819Z dbapi = dialect_cls.dbapi(**dbapi_args)
2019-06-16T16:38:30.5774339Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py:343: in dbapi
2019-06-16T16:38:30.5774573Z raise e
2019-06-16T16:38:30.5775015Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py:341: in dbapi
2019-06-16T16:38:30.5775646Z from sqlite3 import dbapi2 as sqlite # try 2.5+ stdlib name.
2019-06-16T16:38:30.5775789Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/sqlite3/__init__.py:23: in <module>
2019-06-16T16:38:30.5775939Z from sqlite3.dbapi2 import *
2019-06-16T16:38:30.5776075Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2019-06-16T16:38:30.5776177Z
2019-06-16T16:38:30.5776296Z import datetime
2019-06-16T16:38:30.5776401Z import time
2019-06-16T16:38:30.5776747Z import collections.abc
2019-06-16T16:38:30.5777042Z
2019-06-16T16:38:30.5777258Z > from _sqlite3 import *
2019-06-16T16:38:30.5777933Z E ModuleNotFoundError: No module named '_sqlite3'
2019-06-16T16:38:30.5778145Z
2019-06-16T16:38:30.5778290Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/sqlite3/dbapi2.py:27: ModuleNotFoundError
2019-06-16T16:38:30.5778493Z _________________ TestMyViewFailureCondition.test_failing_view _________________
2019-06-16T16:38:30.5778919Z
2019-06-16T16:38:30.5779429Z cls = <class 'sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite'>
2019-06-16T16:38:30.5779840Z
2019-06-16T16:38:30.5780036Z @classmethod
2019-06-16T16:38:30.5780226Z def dbapi(cls):
2019-06-16T16:38:30.5780350Z try:
2019-06-16T16:38:30.5780509Z > from pysqlite2 import dbapi2 as sqlite
2019-06-16T16:38:30.5780957Z E ModuleNotFoundError: No module named 'pysqlite2'
2019-06-16T16:38:30.5781160Z
2019-06-16T16:38:30.5781579Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py:338: ModuleNotFoundError
2019-06-16T16:38:30.5781785Z
2019-06-16T16:38:30.5781925Z During handling of the above exception, another exception occurred:
2019-06-16T16:38:30.5782073Z
2019-06-16T16:38:30.5782202Z self = <silversaucer.tests.TestMyViewFailureCondition testMethod=test_failing_view>
2019-06-16T16:38:30.5782353Z
2019-06-16T16:38:30.5782528Z def setUp(self):
2019-06-16T16:38:30.5782656Z self.config = testing.setUp(settings={
2019-06-16T16:38:30.5783047Z 'sqlalchemy.url': 'sqlite:///:memory:'
2019-06-16T16:38:30.5783276Z })
2019-06-16T16:38:30.5783636Z > self.config.include('.models')
2019-06-16T16:38:30.5783838Z
2019-06-16T16:38:30.5783942Z silversaucer/tests.py:17:
2019-06-16T16:38:30.5784133Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2019-06-16T16:38:30.5784543Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages/pyramid/config/__init__.py:676: in include
2019-06-16T16:38:30.5784765Z c(configurator)
2019-06-16T16:38:30.5784952Z silversaucer/models/__init__.py:68: in includeme
2019-06-16T16:38:30.5785616Z session_factory = get_session_factory(get_engine(settings))
2019-06-16T16:38:30.5785773Z silversaucer/models/__init__.py:16: in get_engine
2019-06-16T16:38:30.5785985Z return engine_from_config(settings, prefix)
2019-06-16T16:38:30.5786735Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages/sqlalchemy/engine/__init__.py:478: in engine_from_config
2019-06-16T16:38:30.5787147Z return create_engine(url, **options)
2019-06-16T16:38:30.5787719Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages/sqlalchemy/engine/__init__.py:435: in create_engine
2019-06-16T16:38:30.5788056Z return strategy.create(*args, **kwargs)
2019-06-16T16:38:30.5788764Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages/sqlalchemy/engine/strategies.py:87: in create
2019-06-16T16:38:30.5789068Z dbapi = dialect_cls.dbapi(**dbapi_args)
2019-06-16T16:38:30.5789464Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py:343: in dbapi
2019-06-16T16:38:30.5789715Z raise e
2019-06-16T16:38:30.5790175Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py:341: in dbapi
2019-06-16T16:38:30.5790413Z from sqlite3 import dbapi2 as sqlite # try 2.5+ stdlib name.
2019-06-16T16:38:30.5790623Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/sqlite3/__init__.py:23: in <module>
2019-06-16T16:38:30.5790830Z from sqlite3.dbapi2 import *
2019-06-16T16:38:30.5790951Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2019-06-16T16:38:30.5791118Z
2019-06-16T16:38:30.5791226Z import datetime
2019-06-16T16:38:30.5791403Z import time
2019-06-16T16:38:30.5791582Z import collections.abc
2019-06-16T16:38:30.5791690Z
2019-06-16T16:38:30.5791861Z > from _sqlite3 import *
2019-06-16T16:38:30.5792242Z E ModuleNotFoundError: No module named '_sqlite3'
2019-06-16T16:38:30.5792451Z
2019-06-16T16:38:30.5792565Z /opt/hostedtoolcache/Python/3.7.3/x64/lib/python3.7/sqlite3/dbapi2.py:27: ModuleNotFoundError
2019-06-16T16:38:30.5793154Z ----------- generated xml file: /home/vsts/work/1/s/test-output.xml ------------
2019-06-16T16:38:30.5793406Z =========================== 2 failed in 0.59 seconds ===========================
2019-06-16T16:38:30.5794245Z ##[error]Bash exited with code '1'.
2019-06-16T16:38:30.5836831Z ##[section]Async Command Start: Publish test results
2019-06-16T16:38:30.7452447Z Publishing test results to test run '162'
2019-06-16T16:38:30.7453277Z Test results remaining: 2. Test run id: 162
2019-06-16T16:38:31.4689352Z Published Test Run : https://dev.azure.com/prcutler/Silver%20Saucer/_TestManagement/Runs?runId=162&_a=runCharts
2019-06-16T16:38:31.4690005Z ##[section]Async Command End: Publish test results
2019-06-16T16:38:31.4690941Z ##[section]Finishing: pytest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment