We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
mode
strmode
1 parent a6e34c1 commit 5c81dfaCopy full SHA for 5c81dfa
tests/test_entry.py
@@ -0,0 +1,22 @@
1
+# This file is part of a program licensed under the terms of the GNU Lesser
2
+# General Public License version 2 (or at your option any later version)
3
+# as published by the Free Software Foundation: http://www.gnu.org/licenses/
4
+
5
6
+from __future__ import division, print_function, unicode_literals
7
8
+from os import stat
9
10
+from libarchive import memory_reader, memory_writer
11
12
13
+def test_entry_properties():
14
15
+ buf = bytes(bytearray(1000000))
16
+ with memory_writer(buf, 'gnutar') as archive:
17
+ archive.add_files('README.rst')
18
19
+ with memory_reader(buf) as archive:
20
+ for entry in archive:
21
+ assert entry.mode == stat('README.rst')[0]
22
+ assert b'rw' in entry.strmode
0 commit comments