Skip to content
This repository was archived by the owner on Jul 19, 2022. It is now read-only.

Commit 52cd3a4

Browse files
committed
fix the automation testing
1 parent 2523588 commit 52cd3a4

File tree

5 files changed

+33
-15
lines changed

5 files changed

+33
-15
lines changed

.github/workflows/pythonpackage.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
max-parallel: 4
1111
matrix:
12-
python-version: [2.7, 3.5, 3.6, 3.7]
12+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
1313

1414
steps:
1515
- uses: actions/checkout@v1
@@ -26,5 +26,5 @@ jobs:
2626
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
2727
- name: Test with Nose
2828
run: |
29-
python setup.py test
30-
29+
pip install tox tox-gh-actions
30+
tox

example.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@
2121

2222
#To create an item
2323
item = {
24-
"fields":[
25-
{"external_id":"org-name", "values":[{"value":"The Items API sucks"}]}
26-
]
24+
"fields":[
25+
{"external_id":"org-name", "values":[{"value":"The Items API sucks"}]}
26+
]
2727
}
28-
#print c.Application.find(179652)
28+
29+
app_id = c.Application.find(179652)
2930
c.Item.create(app_id, item)
30-
31+
3132
#Undefined and created at runtime example
3233
#print c.transport.GET.user.status()
3334

pypodio2/areas.py

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
from urllib.parse import urlencode
1212

1313

14+
class ApiErrorException(Exception):
15+
pass
16+
17+
1418
class Area(object):
1519
"""Represents a Podio Area"""
1620
def __init__(self, transport):

setup.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
from setuptools import setup
22

3+
extras = {
4+
'test': [
5+
'mock',
6+
'nose',
7+
'tox',
8+
]
9+
}
10+
311
setup(
412
name="pypodio2",
513
version="1.0.0b0",
@@ -13,7 +21,7 @@
1321
"httplib2",
1422
"future",
1523
],
16-
tests_require=["nose", "mock", "tox"],
24+
extras_require=extras,
1725
test_suite="nose.collector",
1826
classifiers=[
1927
"Development Status :: 4 - Beta",

tox.ini

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
[tox]
2-
envlist = py27,py35
2+
envlist = py27,py35,py36,py37,py38
3+
4+
[gh-actions]
5+
python =
6+
2.7: py27
7+
3.5: py35
8+
3.6: py36
9+
3.7: py37
10+
3.8: py38
311

412
[testenv]
5-
commands = {envpython} setup.py nosetests
6-
deps =
7-
nose
8-
mock
9-
httplib2
13+
extras = test
14+
commands = {posargs:nosetests}

0 commit comments

Comments
 (0)