move from optparse to argparse

This commit is contained in:
Anthony Sottile 2019-08-10 18:28:32 -07:00
parent 03cb85f556
commit b66ebd7034
30 changed files with 462 additions and 302 deletions

View file

@ -1,5 +1,5 @@
"""Shared fixtures between unit tests."""
import optparse
import argparse
import pytest
@ -11,7 +11,7 @@ def options_from(**kwargs):
kwargs.setdefault('max_doc_length', None)
kwargs.setdefault('verbose', False)
kwargs.setdefault('stdin_display_name', 'stdin')
return optparse.Values(kwargs)
return argparse.Namespace(**kwargs)
@pytest.fixture