File: test_apt_cache_show.py

package info (click to toggle)
jc 1.25.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 101,104 kB
  • sloc: python: 70,400; sh: 724; xml: 278; makefile: 5
file content (31 lines) | stat: -rw-r--r-- 983 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import unittest
import os
import sys
sys.path.append(os.getcwd())
from tests import utils_for_test as test_utils
sys.path.pop()

# Execute these steps for standard tests:
# - Save this file as `test_{parser_name}.py` since the helper methods extract parser names from the filename.
# - Organize fixtures in `tests/fixtures` for optimal structure.
# - Format fixtures as follows (using double dashes):
#     - `{parser_name}--{some_test_description}.out` for command output.
#     - `{parser_name}--{some_test_description}.json` for expected JSON after parsing.

class MyTests(unittest.TestCase):

    def test_apt_cache_show_nodata(self):
        """
        Test 'apt_cache_show' with no data
        """
        test_utils.run_no_data(self, __file__, [])

    def test_apt_cache_show_all_fixtures(self):
        """
        Test 'apt_cache_show' with various fixtures
        """
        test_utils.run_all_fixtures(self, __file__)


if __name__ == '__main__':
    unittest.main()