Skip to content

Commit

Permalink
Merge pull request #418 from chidanandpujar/nose2_support
Browse files Browse the repository at this point in the history
support for nose2 for UT #412
  • Loading branch information
dineshbaburam91 authored Aug 5, 2024
2 parents c7d2487 + 3a5aeff commit 29b178d
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8.12, 3.9.12, 3.10.12, 3.11.9]
python-version: [3.8.12, 3.9.12, 3.10.12, 3.11.9, 3.12.4]

steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/test_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
import os
import yaml
from jnpr.jsnapy.check import Comparator
from mock import patch, MagicMock
from nose.plugins.attrib import attr
from unittest.mock import patch, MagicMock
import nose2

@attr('unit')
class TestCheck(unittest.TestCase):

def setUp(self):
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_comparison_op.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import unittest
import yaml
from jnpr.jsnapy.check import Comparator
from mock import patch
from nose.plugins.attrib import attr
from unittest.mock import patch
import nose2
import os

@attr('unit')

class TestComparisonOperator(unittest.TestCase):

def setUp(self):
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import os
import sys
import yaml
from mock import patch, MagicMock
from nose.plugins.attrib import attr
from unittest.mock import patch, MagicMock
import nose2
from jnpr.jsnapy import get_config_location, get_path, DirStore, venv_check
@attr('unit')

class TestCheck(unittest.TestCase):

def setUp(self):
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_jsnapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import sys
from jnpr.jsnapy import version
from jnpr.jsnapy.jsnapy import SnapAdmin
from mock import patch, MagicMock, call, ANY
from unittest.mock import patch, MagicMock, call, ANY
# from contextlib import nested
from nose.plugins.attrib import attr
import nose2
import argparse
from jnpr.junos.device import Device

Expand All @@ -19,7 +19,7 @@
builtin_string = 'builtins.'


@attr('unit')

class TestSnapAdmin(unittest.TestCase):
def setUp(self):
self.diff = False
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import os
import yaml
from jnpr.jsnapy.check import Comparator
from mock import patch, MagicMock
from nose.plugins.attrib import attr
from unittest.mock import patch, MagicMock
import nose2


@attr('unit')
class TestCheck(unittest.TestCase):

def setUp(self):
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/test_numeric_op.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import unittest
import yaml
from jnpr.jsnapy.check import Comparator
from mock import patch
from unittest.mock import patch
import os
from nose.plugins.attrib import attr
import nose2

@attr('unit')
class TestNumericOperators(unittest.TestCase):

def setUp(self):
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
import yaml
from jnpr.jsnapy.check import Comparator
from jnpr.jsnapy.operator import Operator
from mock import patch, MagicMock
from nose.plugins.attrib import attr
from unittest.mock import patch, MagicMock
import nose2
from lxml import etree

@attr('unit')
class TestCheck(unittest.TestCase):

def setUp(self):
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/test_snap.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
from jnpr.jsnapy import SnapAdmin
import jnpr.junos.device
from jnpr.junos.device import Device
from mock import patch, mock_open, ANY, call, MagicMock
from unittest.mock import patch, mock_open, ANY, call, MagicMock
#from contextlib import nested
from nose.plugins.attrib import attr
import nose2

@attr('unit')
class TestSnap(unittest.TestCase):

def setUp(self):
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/test_snap_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
from jnpr.junos.device import Device
from jnpr.jsnapy import SnapAdmin
import jnpr.junos.device
from mock import patch, mock_open, ANY, call, MagicMock
from nose.plugins.attrib import attr
from unittest.mock import patch, mock_open, ANY, call, MagicMock
import nose2

@attr('unit')
class TestSnap(unittest.TestCase):

def setUp(self):
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/test_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
import sys
from jnpr.jsnapy.sqlite_store import JsnapSqlite
from jnpr.jsnapy.sqlite_get import SqliteExtractXml
from mock import patch
from nose.plugins.attrib import attr
from unittest.mock import patch
import nose2

@attr('unit')
class TestSqlite(unittest.TestCase):

@classmethod
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_str_numeric_op.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import unittest
import yaml
from jnpr.jsnapy.check import Comparator
from mock import patch
from unittest.mock import patch
import os
from nose.plugins.attrib import attr
@attr('unit')
import nose2

class TestStrNumericOperators(unittest.TestCase):

def setUp(self):
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/test_string_op.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import unittest
import yaml
from jnpr.jsnapy.check import Comparator
from mock import patch
from unittest.mock import patch
import os
from nose.plugins.attrib import attr
import nose2

@attr('unit')
class TestStringOperators(unittest.TestCase):

def setUp(self):
Expand Down

0 comments on commit 29b178d

Please sign in to comment.