Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new test failures #8

Open
langston-barrett opened this issue Jul 4, 2017 · 3 comments
Open

new test failures #8

langston-barrett opened this issue Jul 4, 2017 · 3 comments

Comments

@langston-barrett
Copy link

in the version just released to PyPI, I'm getting the following test failures:

======================================================================
FAIL: test_091 (ukpostcodeparser.test.parser.PostcodeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 804, in test_091
    expected=InvalidPostcodeError
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 63, in run_parser
    self.fail(m.format(expected.__name__, postcode, strict, incode_mandatory))
AssertionError: 'InvalidPostcodeError' exception not raised for postcode='w1m 4zz', strict=True and incode_mandatory=False

======================================================================
FAIL: test_097 (ukpostcodeparser.test.parser.PostcodeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 852, in test_097
    expected=InvalidPostcodeError
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 63, in run_parser
    self.fail(m.format(expected.__name__, postcode, strict, incode_mandatory))
AssertionError: 'InvalidPostcodeError' exception not raised for postcode='w1m 4zz', strict=True and incode_mandatory=False

======================================================================
FAIL: test_098 (ukpostcodeparser.test.parser.PostcodeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 860, in test_098
    expected=InvalidPostcodeError
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 63, in run_parser
    self.fail(m.format(expected.__name__, postcode, strict, incode_mandatory))
AssertionError: 'InvalidPostcodeError' exception not raised for postcode='w1m', strict=True and incode_mandatory=False

======================================================================
FAIL: test_125 (ukpostcodeparser.test.parser.PostcodeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 1076, in test_125
    expected=InvalidPostcodeError
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 63, in run_parser
    self.fail(m.format(expected.__name__, postcode, strict, incode_mandatory))
AssertionError: 'InvalidPostcodeError' exception not raised for postcode='w1m 4zz', strict=True and incode_mandatory=True

======================================================================
FAIL: test_131 (ukpostcodeparser.test.parser.PostcodeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 1124, in test_131
    expected=InvalidPostcodeError
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 63, in run_parser
    self.fail(m.format(expected.__name__, postcode, strict, incode_mandatory))
AssertionError: 'InvalidPostcodeError' exception not raised for postcode='w1m 4zz', strict=True and incode_mandatory=True

======================================================================
FAIL: test_091 (ukpostcodeparser.test.parser.PostcodeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 804, in test_091
    expected=InvalidPostcodeError
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 63, in run_parser
    self.fail(m.format(expected.__name__, postcode, strict, incode_mandatory))
AssertionError: 'InvalidPostcodeError' exception not raised for postcode='w1m 4zz', strict=True and incode_mandatory=False

======================================================================
FAIL: test_097 (ukpostcodeparser.test.parser.PostcodeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 852, in test_097
    expected=InvalidPostcodeError
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 63, in run_parser
    self.fail(m.format(expected.__name__, postcode, strict, incode_mandatory))
AssertionError: 'InvalidPostcodeError' exception not raised for postcode='w1m 4zz', strict=True and incode_mandatory=False

======================================================================
FAIL: test_098 (ukpostcodeparser.test.parser.PostcodeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 860, in test_098
    expected=InvalidPostcodeError
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 63, in run_parser
    self.fail(m.format(expected.__name__, postcode, strict, incode_mandatory))
AssertionError: 'InvalidPostcodeError' exception not raised for postcode='w1m', strict=True and incode_mandatory=False

======================================================================
FAIL: test_125 (ukpostcodeparser.test.parser.PostcodeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 1076, in test_125
    expected=InvalidPostcodeError
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 63, in run_parser
    self.fail(m.format(expected.__name__, postcode, strict, incode_mandatory))
AssertionError: 'InvalidPostcodeError' exception not raised for postcode='w1m 4zz', strict=True and incode_mandatory=True

======================================================================
FAIL: test_131 (ukpostcodeparser.test.parser.PostcodeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 1124, in test_131
    expected=InvalidPostcodeError
  File "/tmp/nix-build-python3.6-UkPostcodeParser-1.1.1.drv-0/UkPostcodeParser-1.1.1/ukpostcodeparser/test/parser.py", line 63, in run_parser
    self.fail(m.format(expected.__name__, postcode, strict, incode_mandatory))
AssertionError: 'InvalidPostcodeError' exception not raised for postcode='w1m 4zz', strict=True and incode_mandatory=True

Am I doing something wrong?

@lvisintini
Copy link
Contributor

Hi,

I was the one that made the changes to the test suite in that last PR that got merged.

Previously there was only one tests that checked all the test cases, meaning that the test run failed as soon as the first assertion failed and leave the rest untested.

The new code runs all the tests separately, meaning that all tests cases get executed and you can see all the tests failures.

Unfortunately, this code is only better at telling you whats wrong.

There were a few PRs (#2 and #1) that were meant to allow for additional postcodes to be valid and that is when this tests started failing.

Postcode w1m 4zz and w1m (for non-strict validation) are parsed as valid postcodes when previously they were not.

I presume that this test cases are no longer valid and that w1m 4zz and w1m should be valid, but I do not know enough about the postcode rules be able to make a call on this issue.

prehaps @simonhayward, @enagorny or @brunns are able to shed some light on this....

@ddevault
Copy link

ddevault commented Mar 6, 2019

I just ran into this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants