Skip to content

Commit

Permalink
Fix: unittest: rename TestPrinter to UnitTestPrinter (#1652)
Browse files Browse the repository at this point in the history
so that it will not be collected as a test case.
  • Loading branch information
liangxin1300 authored Jan 2, 2025
2 parents 2402198 + 7da921e commit 150f4c8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/unittests/test_scripts.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import print_function
from __future__ import unicode_literals
# Copyright (C) 2014 Kristoffer Gronlund <[email protected]>
# See COPYING for license information.

Expand Down Expand Up @@ -820,7 +818,7 @@ def test_unified():
assert 'primitive bar IPaddr2 ip=192.168.0.15\ngroup g-foo foo bar' == actions[-1]['text'].strip()


class TestPrinter(object):
class UnitTestPrinter:
def __init__(self):
import types
self.actions = []
Expand Down Expand Up @@ -860,7 +858,7 @@ def test_inline_script():
assert len(actions) == 1
assert actions[0]['name'] == 'call'
assert actions[0]['value'] == '#!/bin/sh\necho "hello world"'
tp = TestPrinter()
tp = UnitTestPrinter()
scripts.run(script_a,
{"foo": "hello world"}, tp)

Expand Down

0 comments on commit 150f4c8

Please sign in to comment.