Test fixes (#19)
* We don't actually need lzma yet * try and fix windows paths * specify file mode * fix coverage
This commit is contained in:
Родитель
88fc0c6010
Коммит
81d4c7fca0
16
.coveragerc
16
.coveragerc
|
@ -1,2 +1,16 @@
|
|||
[paths]
|
||||
source =
|
||||
src/mardor
|
||||
*/site-packages/mardor
|
||||
|
||||
[run]
|
||||
branch = True
|
||||
branch = true
|
||||
source =
|
||||
mardor
|
||||
tests
|
||||
parallel = true
|
||||
|
||||
[report]
|
||||
show_missing = true
|
||||
precision = 2
|
||||
omit = *migrations*
|
||||
|
|
1
setup.py
1
setup.py
|
@ -72,7 +72,6 @@ setup(
|
|||
'click',
|
||||
'cryptography',
|
||||
'construct',
|
||||
'backports.lzma',
|
||||
],
|
||||
extras_require={
|
||||
# eg:
|
||||
|
|
|
@ -156,6 +156,10 @@ class MarWriter(object):
|
|||
f = bz2_compress_stream(f)
|
||||
size = write_to_file(f, self.fileobj)
|
||||
|
||||
# On Windows, convert \ to /
|
||||
if os.sep == '\\':
|
||||
path = path.replace('\\', '/')
|
||||
|
||||
e = dict(
|
||||
name=path,
|
||||
offset=self.last_offset,
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#
|
||||
# pip-compile --output-file test-requirements.txt test-requirements.in
|
||||
#
|
||||
backports.lzma==0.0.6
|
||||
cffi==1.8.3
|
||||
construct==2.8.8
|
||||
coverage==4.2 # via pytest-cov
|
||||
|
|
|
@ -62,13 +62,14 @@ def test_list_noextra(tmpdir):
|
|||
test_mar = tmpdir.join('test.mar')
|
||||
|
||||
tmpdir.join('hello.txt').write('hello world')
|
||||
tmpdir.join('hello.txt').chmod(0o666)
|
||||
with tmpdir.as_cwd():
|
||||
cli.do_create(str(test_mar), ['hello.txt'], 'bz2')
|
||||
|
||||
lines = list(cli.do_list(str(test_mar)))
|
||||
assert lines == [
|
||||
'SIZE MODE NAME ',
|
||||
' 11 0644 hello.txt',
|
||||
' 11 0666 hello.txt',
|
||||
]
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче