Bug#877726: test_progress regression with WoLpH/python-progressbar 3.34.3

2018-01-03 Thread Chris Lamb
Hi,

> > < anthraxx > lamby: h01ger: can anyone give me the output of
> >  print(err) in def test_progress() in tests/test_progress.py
> >  would help me creating a patch that works with both versions
[..]

Any luck with the patch? :)  If you let me know your output I could
work on it instead.


Best wishes,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#877726: test_progress regression with WoLpH/python-progressbar 3.34.3

2017-10-06 Thread Chris Lamb
Hi,

> test_progress regression with WoLpH/python-progressbar 3.34.3

< anthraxx > lamby: h01ger: can anyone give me the output of
 print(err) in def test_progress() in tests/test_progress.py
 would help me creating a patch that works with both versions

Sure. Starting with 70cb725deb12a2eddc4613b5e3af69ed13434bf7 and I apply:

  --- a/tests/test_progress.py
  +++ b/tests/test_progress.py
  @@ -46,6 +46,9 @@ def test_progress(capsys):
   assert ret == 1
   assert "ETA" in err
  +print('---')
  +print(repr(err))
  +print('---')


… I get:


  $ PYTHON3PATH=. py.test-3 -s tests/test_progress.py
  
==
 test session starts 
===
  platform linux -- Python 3.5.4, pytest-3.2.1, py-1.4.34, pluggy-0.4.0
  benchmark: 3.0.0 (defaults: timer=time.perf_counter disable_gc=False 
min_rounds=5 min_time=5.00us max_time=1.00s calibration_precision=10 
warmup=False warmup_iterations=10)
  rootdir: /home/lamby/git/debian/reproducible/diffoscope, inifile:
  plugins: pylint-0.7.1, cov-2.5.1, benchmark-3.0.0
  collected 2 items 


  
  tests/test_progress.py ---
  ' |  |0% ETA:  
--:--:-- \r |###|   86%   dir/text  
ETA:  0:00:00 \r |## |   98%   dir/null 
 ETA:  0:00:00 \r |## |   99%   
dir/link  ETA:  0:00:00 \r |###|  100%  
   ETA:  0:00:00 \r |###|  100% 
ETA:  0:00:00 \r |###|  100%
 Time: 0:00:00 \r\n'
  ---
  ..
  
  

 2 passed in 0.39 seconds 



(Also here: https://gist.github.com/lamby/4045538fa4417b26457d4d29bf72986e/raw)


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#877726: test_progress regression with WoLpH/python-progressbar 3.34.3

2017-10-04 Thread Levente Polyak
Package: diffoscope

There is a test failure when using python-progressbar 3.34.3.
It expects 'ETA' to be in the output, however the err seems to be empty
and the stdout is atteched (does not contain ETA, maybe because its
already at 100%).


test session starts

platform linux -- Python 3.6.2, pytest-3.2.2, py-1.4.34, pluggy-0.4.0
rootdir: /home/anthraxx/Projects/external/diffoscope, inifile:
plugins: cov-2.5.1
collected 2 items



tests/test_progress.py F.

=
FAILURES
==
___
test_progress
___

capsys = <_pytest.capture.CaptureFixture object at 0x7fbaeca59ef0>

@skip_unless_module_exists('progressbar')
def test_progress(capsys):
ret, _, err = run(capsys, TEST_TAR1_PATH, TEST_TAR2_PATH,
'--progress')

assert ret == 1
print(err, ret, _)
>   assert "ETA" in err
E   AssertionError: assert 'ETA' in ''

tests/test_progress.py:49: AssertionError
---
Captured stdout call

 1 --- /home/anthraxx/Projects/external/diffoscope/tests/data/test1.tar
+++ /home/anthraxx/Projects/external/diffoscope/tests/data/test2.tar
├── file list
│ @@ -1,4 +1,4 @@
│ -drwxr-xr-x   0 lunar (1000) lunar (1000)0 2015-06-29
15:49:09.00 dir/
│ --rw-r--r--   0 lunar (1000) lunar (1000)  446 2015-06-29
15:49:09.00 dir/text
│ -crw-r--r--   0 root (0) root (0)1,  3 2015-06-29
15:49:09.00 dir/null
│ -lrwxrwxrwx   0 lunar (1000) lunar (1000)0 2015-06-29
15:49:09.00 dir/link -> broken
│ +drwxr-xr-x   0 lunar (1000) lunar (1000)0 2015-06-29
15:49:41.00 dir/
│ +-rw-r--r--   0 lunar (1000) lunar (1000)  671 2015-06-29
15:49:41.00 dir/text
│ +crw-r--r--   0 root (0) root (0)1,  3 2015-06-29
15:49:41.00 dir/null
│ +lrwxrwxrwx   0 lunar (1000) lunar (1000)0 2015-06-29
15:49:41.00 dir/link -> really-broken
├── dir/text
│ @@ -1,6 +1,12 @@
│ +A common form of lorem ipsum reads:
│ +
│  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor
│  incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis
│  nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
│  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
dolore eu
│  fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in
│  culpa qui officia deserunt mollit anim id est laborum.
│ +
│ +"Lorem ipsum" text is derived from sections 1.10.32--3 of Cicero's De
finibus
│ +bonorum et malorum (On the Ends of Goods and Evils, or alternatively
[About]
│ +The Purposes of Good and Evil).
├── dir/link
│┄ symlink
│ @@ -1 +1 @@
│ -destination: broken
│ +destination: really-broken

---
Captured stderr call

 ||  100%  None  Time:
0:00:00
 1 failed, 1
passed in 0.42 seconds
=