Skip to content

Option '--trace' doesn't work with module 'unittest' #3823

Closed
blueyed/pytest
#101
@guocb

Description

@guocb

Thanks first for adding option '--trace'. That's very helpful to me.

I tried it and it does work with test functions. However, it doesn't work with tests based on python unittest module, e.g.

import unittest

class TestFoo(unittest.TestCase):
    def test_1(self):
        assert True

The output is:

bash-4.4$ pytest --trace tmp/test1.py
============================================================ test session starts ============================================================
platform linux -- Python 3.6.5, pytest-3.7.1, py-1.5.3, pluggy-0.7.1
rootdir: /data/data/com.termux/files/home, inifile:
plugins: interactive-0.1.4
collected 1 item

tmp/test1.py .                                                                                                                        [100%]

========================================================= 1 passed in 0.01 seconds ==========================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: debuggingrelated to the debugging builtin pluginplugin: unittestrelated to the unittest integration builtin plugintype: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions