Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
include README.md
include COPYING
include *.md
include *.txt
recursive-include tests *.py
recursive-include examples *
recursive-include testdata *
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ description-file = README.md

[aliases]
test=pytest

[bdist_wheel]
universal=1
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries'],
requires=['six'],
packages=['textfsm'],
include_package_data=True,
package_data={'textfsm': ['../testdata/*']},
install_requires=['six', 'future'],
setup_requires=['pytest-runner'],
tests_require=['pytest'])
4 changes: 3 additions & 1 deletion tests/clitable_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

import copy
import os
import re
import unittest

from io import StringIO
from textfsm import clitable
from textfsm import copyable_regex_object
from six.moves import StringIO


class UnitTestIndexTable(unittest.TestCase):
Expand Down Expand Up @@ -88,6 +89,7 @@ class UnitTestCliTable(unittest.TestCase):
"""Tests the CliTable class."""

def setUp(self):
super(UnitTestCliTable, self).setUp()
clitable.CliTable.INDEX = {}
self.clitable = clitable.CliTable('default_index', 'testdata')
self.input_data = ('a b c\n'
Expand Down
1 change: 1 addition & 0 deletions tests/copyable_regex_object_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

import copy
import unittest
Expand Down
10 changes: 8 additions & 2 deletions tests/terminal_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,23 @@

"""Unittest for terminal module."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

from builtins import range
from builtins import object
import sys
import unittest

# pylint: disable=redefined-builtin
from six.moves import range
from textfsm import terminal


class TerminalTest(unittest.TestCase):

def setUp(self):
super(TerminalTest, self).setUp()
self.environ_orig = terminal.os.environ
self.open_orig = terminal.os.open
self.terminal_orig = terminal.TerminalSize
Expand Down Expand Up @@ -142,6 +147,7 @@ def flush(self):
class PagerTest(unittest.TestCase):

def setUp(self):
super(PagerTest, self).setUp()
sys.stdout = FakeTerminal()
self.get_ch_orig = terminal.Pager._GetCh
terminal.Pager._GetCh = lambda self: 'q'
Expand Down
Loading