Add build documentation test

This commit is contained in:
Michael Shepanski 2017-02-13 17:44:28 -05:00
parent 6d01bd4b72
commit b36a6776a5
6 changed files with 20 additions and 17 deletions

View file

@ -16,7 +16,9 @@ before_install:
- pip install -U pytest pytest-cov coveralls - pip install -U pytest pytest-cov coveralls
install: install:
- pip install -r requirements.txt
- pip install -r requirements_dev.txt - pip install -r requirements_dev.txt
- pip install -r requirements_doc.txt
script: script:
- py.test tests --tb=native --verbose --cov-config .coveragerc --cov=plexapi --cov-report=html - py.test tests --tb=native --verbose --cov-config .coveragerc --cov=plexapi --cov-report=html

5
docs/modules/base.rst Normal file
View file

@ -0,0 +1,5 @@
Base (plexapi.base)
---------------------
.. automodule:: plexapi.base
:members:
:show-inheritance:

View file

@ -12,6 +12,7 @@
:caption: Modules :caption: Modules
modules/audio modules/audio
modules/base
modules/client modules/client
modules/config modules/config
modules/exceptions modules/exceptions

View file

@ -5,22 +5,7 @@ from plexapi.exceptions import NotFound
class SyncItem(object): class SyncItem(object):
""" Sync Item (NOT WORKING?) """ Sync Item. This doesn't current work. """
Attributes:
device (TYPE): Description
id (TYPE): Description
location (TYPE): Description
machineIdentifier (TYPE): Description
MediaSettings (TYPE): Description
metadataType (TYPE): Description
policy (TYPE): Description
rootTitle (TYPE): Description
servers (TYPE): Description
status (TYPE): Description
title (TYPE): Description
version (TYPE): Description
"""
def __init__(self, device, data, servers=None): def __init__(self, device, data, servers=None):
self._device = device self._device = device
self._servers = servers self._servers = servers

View file

@ -4,5 +4,4 @@ coveralls
pillow pillow
pytest pytest
pytest-cov pytest-cov
requests
websocket-client websocket-client

11
tests/test_docs.py Normal file
View file

@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
import shlex, subprocess
from os.path import abspath, dirname, join
def test_build_documentation():
docroot = join(dirname(dirname(abspath(__file__))), 'docs')
cmd = shlex.split('/usr/bin/make html')
proc = subprocess.Popen(cmd, cwd=docroot)
status = proc.wait()
assert status == 0