Bug#849333: faker: Non-determistically FTBFS due to tests sometimes exposing UnboundLocalError

2016-12-25 Thread Chris Lamb
tags 849333 + patch
thanks

Patch attached.


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-
diff --git a/faker/providers/ssn/fi_FI/__init__.py 
b/faker/providers/ssn/fi_FI/__init__.py
index 44d9ff3..bba2c0b 100644
--- a/faker/providers/ssn/fi_FI/__init__.py
+++ b/faker/providers/ssn/fi_FI/__init__.py
@@ -39,7 +39,7 @@ class Provider(SsnProvider):
 if birthday.year < 2000:
 separator = '-'
 else:
-separator += 'A'
+separator = 'A'
 suffix = str(random.randrange(2, 899)).zfill(3)
 checksum = _checksum(hetu_date + suffix)
 hetu = "".join([hetu_date, separator, suffix, checksum])


Bug#849333: faker: Non-determistically FTBFS due to tests sometimes exposing UnboundLocalError

2016-12-25 Thread Chris Lamb
forwarded 849333 https://github.com/joke2k/faker/pull/441
thanks

I've forwarded this upstream here:

   https://github.com/joke2k/faker/pull/441


Regards,

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



Bug#849333: faker: Non-determistically FTBFS due to tests sometimes exposing UnboundLocalError

2016-12-25 Thread Chris Lamb
Source: faker
Version: 0.7.7-1
Severity: serious
Justification: fails to build from source
User: reproducible-bui...@lists.alioth.debian.org
Usertags: ftbfs
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Dear Maintainer,

faker's testsuite appears to non-deterministically vary in behaviour,
causing a FTBFS when it exposes a programming error:

  […]

  ==
  ERROR: test_documentor (faker.tests.FactoryTestCase)
  --
  Traceback (most recent call last):
File "faker/tests/__init__.py", line 207, in test_documentor
  print_doc(output=output)
File "faker/cli.py", line 110, in print_doc
  excludes=base_provider_formatters):
File "faker/documentor.py", line 32, in get_formatters
  (provider, self.get_provider_formatters(provider, **kwargs))
File "faker/documentor.py", line 87, in get_provider_formatters
  example = self.generator.format(name)
File "faker/generator.py", line 66, in format
  return self.get_formatter(formatter)(*args, **kwargs)
File "faker/providers/profile/__init__.py", line 47, in profile
  "ssn": self.generator.ssn(),
File "faker/providers/ssn/fi_FI/__init__.py", line 42, in ssn
  separator += 'A'
  UnboundLocalError: local variable 'separator' referenced before assignment
  
  --
  Ran 45 tests in 2.150s
  
  FAILED (errors=1)
  debian/rules:27: recipe for target 'override_dh_auto_test' failed
  make[1]: *** [override_dh_auto_test] Error 1
  make[1]: Leaving directory '«BUILDDIR»'
  debian/rules:10: recipe for target 'build' failed
  make: *** [build] Error 2
  dpkg-buildpackage: error: debian/rules build gave error exit status 2

  […]

The full build log is attached.


Regards,

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


faker.0.7.7-1.unstable.amd64.log.txt.gz
Description: Binary data