예제 #1
0
def test_find_module_not_package():
    file_io, is_package = _find_module('io')
    assert file_io.path.name == 'io.py'
    assert is_package is False
예제 #2
0
def test_find_module_not_package():
    file_io, is_package = _find_module('io')
    assert file_io.path.endswith('io.py')
    assert is_package is False
예제 #3
0
def test_find_module_package():
    file_io, is_package = _find_module('json')
    assert file_io.path.parts[-2:] == ('json', '__init__.py')
    assert is_package is True
예제 #4
0
def test_find_module_package():
    file_io, is_package = _find_module('json')
    assert file_io.path.endswith(os.path.join('json', '__init__.py'))
    assert is_package is True