Exemplo n.º 1
0
from write_me.dep_info import parse
from write_me.django_setings_info import get_settings_info
from write_me.django_uri_info import get_url_docstrings
from write_me.get_license import get_license_type
from write_me.list_files import get_all_py_files
from write_me.project_data import get_project_url
from write_me.pyramid_ini import get_dev_info
from write_me.travis_badge import get_travis_badge
from write_me.stp_info import parse_setup_py
from write_me.tsting_info import get_docstrings

settings_dict = get_settings_info()
url_dict = get_url_docstrings()
setup_dict = parse_setup_py()
dependencies = parse()
license = get_license_type()
test_dict = get_docstrings()
get_all_py = get_all_py_files()
user_data = get_project_url()
pyramid_info = get_dev_info()
badge = get_travis_badge()

testing_lst = parse(get_all_py)
testing_mod = ''
for i in testing_lst:
    if i == "pytest" or i == "nose":
        testing_mod = i
if not testing_mod:
    testing_mod = "unittest"
Exemplo n.º 2
0
def test_parse_func_returns_list():
    """Test if parse() returns list."""
    assert isinstance(parse(), list)
Exemplo n.º 3
0
def test_parse_removes_all_the_whites():
    """Test parse function removes extra white space."""
    assert ' markdown_generator' not in parse()
Exemplo n.º 4
0
def test_parse_doesnt_return_commas():
    """Test parse function doesn't return commas."""
    assert ', ' not in parse()
Exemplo n.º 5
0
def test_parse_has_no_as_alias():
    """Test parse function doesn't return import alias."""
    assert 'markdown_generator as mg' not in parse()
Exemplo n.º 6
0
def test_local_module_not_returned_by_parse():
    """Test local module not returned by parse()."""
    assert '.list_files' not in parse()
Exemplo n.º 7
0
def test_std_library_not_returned_by_parse():
    """Test a standard library module not returned by parse()."""
    assert 'os' not in parse()
Exemplo n.º 8
0
def test_parse_returns_external_dependency():
    """Test parse returns external dependency."""
    assert 'markdown_generator' in parse()