Commit e614614d authored by richardARPANET's avatar richardARPANET

ci config

parent ac8e2b25
Pipeline #92 failed with stage
in 25 minutes and 25 seconds
before_script: before_script:
# Install pyenv
- apt-get update - apt-get update
- apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev - apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev
- pip install tox
- git clone https://github.com/pyenv/pyenv.git ~/.pyenv - git clone https://github.com/pyenv/pyenv.git ~/.pyenv
- export PYENV_ROOT="$HOME/.pyenv" - export PYENV_ROOT="$HOME/.pyenv"
- export PATH="$PYENV_ROOT/bin:$PATH" - export PATH="$PYENV_ROOT/bin:$PATH"
- eval "$(pyenv init -)"
# Install tox
- pip install tox
test:python26:
script:
- pyenv install 2.6.9
- pyenv shell 2.6.9
- tox -e py26-normal
test:python27:
script:
- pyenv install 2.7.14
- pyenv shell 2.7.14
- tox -e py27-normal
test:python34:
script:
- pyenv install 3.4.7
- pyenv shell 3.4.7
- tox -e py34-normal
test:python35: test:python35:
script: script:
- pyenv install 3.5.4 - pyenv install 3.5.4
- eval "$(pyenv init -)"
- pyenv shell 3.5.4 - pyenv shell 3.5.4
- tox -e py35-normal - tox -e py35-normal
test:python36: test:python36:
script: script:
- pyenv install 3.6.4 - pyenv install 3.6.4
- eval "$(pyenv init -)"
- pyenv shell 3.6.4 - pyenv shell 3.6.4
- tox -e py36-normal - tox -e py36-normal
test:python34:
script:
- pyenv install 3.4.7
- eval "$(pyenv init -)"
- pyenv shell 3.4.7
- tox -e py34-normal
...@@ -45,7 +45,6 @@ _SIMPLE_GET_ENDPOINTS = { ...@@ -45,7 +45,6 @@ _SIMPLE_GET_ENDPOINTS = {
'get_title_awards': '/title/{imdb_id}/awards', 'get_title_awards': '/title/{imdb_id}/awards',
'get_title_ratings': '/title/{imdb_id}/ratings', 'get_title_ratings': '/title/{imdb_id}/ratings',
'get_title_credits': '/title/{imdb_id}/fullcredits', 'get_title_credits': '/title/{imdb_id}/fullcredits',
'get_title_certification': '/title/{imdb_id}/certification',
'get_name': '/name/{imdb_id}/fulldetails', 'get_name': '/name/{imdb_id}/fulldetails',
'get_name_filmography': '/name/{imdb_id}/filmography', 'get_name_filmography': '/name/{imdb_id}/filmography',
} }
...@@ -55,7 +54,7 @@ class Imdb(Auth): ...@@ -55,7 +54,7 @@ class Imdb(Auth):
def __init__(self, locale=None, exclude_episodes=False, session=None): def __init__(self, locale=None, exclude_episodes=False, session=None):
self.locale = locale or 'en_US' self.locale = locale or 'en_US'
self.region = self.locale.split('_')[-1] self.region = self.locale.split('_')[-1].upper()
self.exclude_episodes = exclude_episodes self.exclude_episodes = exclude_episodes
self.session = session or requests.Session() self.session = session or requests.Session()
self._cachedir = tempfile.gettempdir() self._cachedir = tempfile.gettempdir()
...@@ -115,7 +114,7 @@ class Imdb(Auth): ...@@ -115,7 +114,7 @@ class Imdb(Auth):
if ( if (
self.exclude_episodes is True and self.exclude_episodes is True and
resource['titleType'] == 'tvEpisode' resource['titleType'].lower() == 'tvepisode'
): ):
raise LookupError( raise LookupError(
'Title not found. Title was an episode and ' 'Title not found. Title was an episode and '
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment