def test_project_manager(init_project):
    ProjectManager.set_path('tests/sample_project')
    assert ProjectManager.RACKET_DIR == 'tests/sample_project'

    ProjectManager.set_path('tests/sample_project-2')
    ProjectManager.create_subdirs()
    assert os.path.exists('tests/sample_project-2') is True
    shutil.rmtree('tests/sample_project-2')

    ProjectManager.set_path('tests/sample_project')
    ProjectManager.create_template()
    for file in TEMPLATE_PROJECT_FILES:
        file_path = file.replace('template/', '')
        assert os.path.isfile(os.path.join(ProjectManager.RACKET_DIR, file_path))
Exemple #2
0
def test_project():
    ProjectManager.set_path(None)
    with pytest.raises(NotInitializedError):
        ProjectManager.get_models()
def test_project():
    # noinspection PyTypeChecker
    ProjectManager.set_path(None)
    with pytest.raises(NotInitializedError):
        ProjectManager.get_models()