Skip to content

Commit

Permalink
Fixes #125: enable tests for python 3.10.0, drop nosetests (#126)
Browse files Browse the repository at this point in the history
* chore: enable tox/gh-actions for py 3.10.0-rc.2
* drop nosetests, use coverage + unittest
  • Loading branch information
eshaan7 authored Nov 1, 2021
1 parent 67e6c5f commit 90f4dfb
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pull_request_automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 4
max-parallel: 5
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9']
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10.0']

steps:
- uses: actions/checkout@v2
Expand Down
1 change: 0 additions & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
nose==1.3.7
black==20.8b1
flake8==3.9.1
pre-commit==2.12.1
Expand Down
2 changes: 1 addition & 1 deletion tests/mocked_requests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .utils import (
from tests.utils import (
MockResponse,
get_file_data,
ROOT_DIR,
Expand Down
5 changes: 3 additions & 2 deletions tests/test_general.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from pyintelowl.exceptions import IntelOwlClientException
from .utils import (

from tests.utils import (
BaseTest,
mock_connections,
patch,
get_file_data,
)
from .mocked_requests import (
from tests.mocked_requests import (
mocked_analyzer_config,
mocked_ask_analysis_success,
mocked_ask_analysis_no_status,
Expand Down
5 changes: 3 additions & 2 deletions tests/test_jobs.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from pyintelowl.exceptions import IntelOwlClientException
from .utils import (

from tests.utils import (
BaseTest,
mock_connections,
patch,
get_file_data,
)
from .mocked_requests import (
from tests.mocked_requests import (
mocked_analyzer_healthcheck,
mocked_connector_healthcheck,
mocked_get_all_jobs,
Expand Down
5 changes: 3 additions & 2 deletions tests/test_tags.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from pyintelowl.exceptions import IntelOwlClientException
from .utils import (

from tests.utils import (
BaseTest,
mock_connections,
patch,
)
from .mocked_requests import (
from tests.mocked_requests import (
mocked_get_all_tags,
mocked_get_tag_by_id,
mocked_create_tag,
Expand Down
1 change: 1 addition & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from unittest.mock import patch # noqa: F401

from pyintelowl.pyintelowl import IntelOwl

from tests import (
MOCK_CONNECTIONS,
TEST_ANALYZER_NAME,
Expand Down
14 changes: 4 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
[tox]
envlist =
flake8,
py36,py37,py38,py39

[testenv:flake8]
changedir = {toxinidir}
commands = flake8 . --count
deps = flake8
py{36,37,38,39,310}-click7
py{36,37,38,39,310}-click8

[testenv]
changedir = tests
commands =
nosetests --with-coverage --cover-xml --cover-xml-file={toxinidir}/tests/coverage.xml
whitelist_externals = nosetests
coverage run -m unittest discover tests
setenv =
PIP_INDEX_URL = https://pypi.python.org/simple/
deps =
Expand All @@ -24,6 +17,7 @@ python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310

[testenv:codecov]
passenv = TOXENV CI CODECOV_*
Expand Down

0 comments on commit 90f4dfb

Please sign in to comment.