MCPcopy Index your code
hub / github.com/ahupp/python-magic / test_descriptions

Method test_descriptions

test/python_magic_test.py:104–129  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

102 os.unlink(dest)
103
104 def test_descriptions(self):
105 m = magic.Magic()
106 os.environ['TZ'] = 'UTC' # To get last modified date of test.gz in UTC
107 try:
108 self.assert_values(m, {
109 'magic._pyc_': 'python 2.4 byte-compiled',
110 'test.pdf': ('PDF document, version 1.2',
111 'PDF document, version 1.2, 2 pages'),
112 'test.gz':
113 ('gzip compressed data, was "test", from Unix, last '
114 'modified: Sun Jun 29 01:32:52 2008',
115 'gzip compressed data, was "test", last modified'
116 ': Sun Jun 29 01:32:52 2008, from Unix',
117 'gzip compressed data, was "test", last modified'
118 ': Sun Jun 29 01:32:52 2008, from Unix, original size 15',
119 'gzip compressed data, was "test", '
120 'last modified: Sun Jun 29 01:32:52 2008, '
121 'from Unix, original size modulo 2^32 15',
122 'gzip compressed data, was "test", last modified'
123 ': Sun Jun 29 01:32:52 2008, from Unix, truncated'
124 ),
125 'text.txt': 'ASCII text',
126 'test.snappy.parquet': ('Apache Parquet', 'Par archive data'),
127 }, buf_equals_file=False)
128 finally:
129 del os.environ['TZ']
130
131 def test_extension(self):
132 try:

Callers

nothing calls this directly

Calls 1

assert_valuesMethod · 0.95

Tested by

no test coverage detected