Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stacktraces in doctest and unittest #98

Open
skogsbaer opened this issue Apr 26, 2022 · 2 comments
Open

Stacktraces in doctest and unittest #98

skogsbaer opened this issue Apr 26, 2022 · 2 comments

Comments

@skogsbaer
Copy link
Owner

Stacktraces contain entries for untypy if type error occur in doctests and unittests. Can we remove these entries?

@skogsbaer
Copy link
Owner Author

def foo(i: int):
    return i+1

def bar():
    '''
    >>> foo('stefan')
    '''

import doctest

doctest.testmod(report=True)

@skogsbaer
Copy link
Owner Author

def foo(i: int):
    return i+1

import unittest

class MyTest(unittest.TestCase):
    def test_foo(self):
        self.assertEqual("stefan", foo("stefan"))

unittest.main()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant