Commit 92991f0
authored
unittest - fix import for python 2 (#139)
Submodule update failed for python 2 because mock import statement is not compatible for python 2
Fix import statement for python 2 and python 3
Passed UT for python 2 and python 3
```
platform linux2 -- Python 2.7.16, pytest-3.10.1, py-1.7.0, pluggy-0.8.0
rootdir: /sonic/src/sonic-py-swsssdk, inifile: pytest.ini
plugins: cov-2.6.0
collected 7 items
test/sonic_db_dump_load_test.py .. [ 28%]
test/test_moduleLoad.py .... [ 85%]
test/test_port_util.py . [100%]
platform linux -- Python 3.9.2, pytest-6.0.2, py-1.10.0, pluggy-0.13.0
rootdir: /sonic/src/sonic-py-swsssdk, configfile: pytest.ini
plugins: pyfakefs-5.2.2, cov-2.10.1
collected 7 items
test/sonic_db_dump_load_test.py .. [ 28%]
test/test_moduleLoad.py .... [ 85%]
test/test_port_util.py . [100%]
```1 parent 30075a4 commit 92991f0
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
| |||
0 commit comments