class documentation
class TestReadAttr: (source)
Undocumented
Method | test |
Sometimes the import machinery will import the parent package of a nested module, which triggers side-effects and might create problems (see issue #3176) |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Sometimes the import machinery will import the parent package of a nested module, which triggers side-effects and might create problems (see issue #3176) ``read_attr`` should bypass these limitations by resolving modules statically (via ast.literal_eval).
@pytest.mark.parametrize( 'example', [ 'VERSION: str\nVERSION = \'0.1.1\'\nraise SystemExit(1)\n', 'VERSION: str = \'0.1.1\'\nraise SystemExit(1)\n'])
def test_read_annotated_attr(self, tmp_path, example): (source) ¶
def test_read_annotated_attr(self, tmp_path, example): (source) ¶
Undocumented
@pytest.mark.parametrize( 'example', [ b'__version__ = '\xc3\xa9'\nraise SystemExit(1)\n', b'# -*- coding: utf-8 -*-\n__version__ = '\xc3\xa9'\nraise SystemExit(1)\n', b'# -*- coding: latin1 -*-\n__version__ = '\xe9'\nraise SystemExit(1)\n'])
def test_read_attr_encoding_cookie(self, example, tmp_path): (source) ¶
def test_read_attr_encoding_cookie(self, example, tmp_path): (source) ¶
Undocumented