-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: unittest: rename TestPrinter to UnitTestPrinter (#1652)
so that it will not be collected as a test case.
- Loading branch information
Showing
1 changed file
with
2 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
|
@@ -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 = [] | ||
|
@@ -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) | ||
|
||
|