Commit 7f008a1
authored
Fix UT test_BlockUseSwsssdk() (#128)
#### Why I did it
Fix this issue: sonic-net/sonic-buildimage#12558
UT failed under python2: test_BlockUseSwsssdk()
> result = subprocess.run(["python", "-c", "import swsssdk;exit()"], capture_output=True, cwd=swsssdk_path)
E AttributeError: 'module' object has no attribute 'run'
#### How I did it
Update UT to use subprocess.check_output(), which support by both python3 and python2.
#### How to verify it
Pass all UT.
#### Which release branch to backport (provide reason below if selected)
#### Description for the changelog
Fix UT test_BlockUseSwsssdk()
#### Link to config_db schema for YANG module changes
#### A picture of a cute animal (not mandatory but encouraged)1 parent e30a1e1 commit 7f008a1
1 file changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
0 commit comments