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

Tests fail with latest preggy version (>= 1.3) #130

Open
marcelometal opened this issue Jun 21, 2016 · 1 comment
Open

Tests fail with latest preggy version (>= 1.3) #130

marcelometal opened this issue Jun 21, 2016 · 1 comment
Labels

Comments

@marcelometal
Copy link
Collaborator

This is the 'make test ' output:

teardown
teardown-err

 ============
 Vows Results
 ============


    Assertion errors
      Errors
        When error messages do not match
        ✗ we get an understandable message
            Expected topic(u"Expected topic(u'some bogus error') to be an error with message 'some bogus'") to be an error with message "Expected topic('some bogus error') to be an error with message 'some bogus'"

Traceback (most recent call last):
              File "/home/metal/work/pyvows/pyvows/runner/abc.py", line 65, in run_vow
    result = vow(ctx_obj, topic)
              File "/home/metal/work/pyvows/tests/assertions/types/errors_vows.py", line 56, in we_get_an_understandable_message
    expect(topic).to_have_an_error_message_of(expected_message)
              File "/home/metal/debian/preggy/preggy/core.py", line 285, in _assert_topic
    return _registered_assertions[method_name](self.topic, *args, **kw)
              File "/home/metal/debian/preggy/preggy/core.py", line 58, in wrapper
    func(*args, **kw)
              File "/home/metal/debian/preggy/preggy/assertions/types/errors.py", line 35, in to_have_an_error_message_of
    raise err
AssertionError: Expected topic(u"Expected topic(u'some bogus error') to be an error with message 'some bogus'") to be an error with message "Expected topic('some bogus error') to be an error with message 'some bogus'"


             found in /home/metal/work/pyvows/tests/assertions/types/errors_vows.py at line 51 

    Py vows command line interface
      Argument parser
        Parses correctly
        ✗ should contain cover
            'Namespace' object is not iterable

Traceback (most recent call last):
              File "/home/metal/work/pyvows/pyvows/runner/abc.py", line 65, in run_vow
    result = vow(ctx_obj, topic)
              File "/home/metal/work/pyvows/tests/cli_vows.py", line 42, in should_contain_cover
    expect(topic).to_include('cover')
              File "/home/metal/debian/preggy/preggy/core.py", line 285, in _assert_topic
    return _registered_assertions[method_name](self.topic, *args, **kw)
              File "/home/metal/debian/preggy/preggy/core.py", line 58, in wrapper
    func(*args, **kw)
              File "/home/metal/debian/preggy/preggy/core.py", line 123, in test_assertion
    if not func(*args):
              File "/home/metal/debian/preggy/preggy/assertions/inclusion.py", line 29, in to_include
    for t in topic:
TypeError: 'Namespace' object is not iterable


             found in /home/metal/work/pyvows/tests/cli_vows.py at line 41 

    Captured output vows
      Results from context that prints when sys streams are patched
        Top context stdout
        ✗ has setup topic teardown
            Expected topic('setup\ntopic\n') to equal 'setup\ntopic\nteardown\n'

Traceback (most recent call last):
              File "/home/metal/work/pyvows/pyvows/runner/abc.py", line 65, in run_vow
    result = vow(ctx_obj, topic)
              File "/home/metal/work/pyvows/tests/captured_output_vows.py", line 28, in has_setup_topic_teardown
    expect(topic).to_equal('setup\ntopic\nteardown\n')
              File "/home/metal/debian/preggy/preggy/core.py", line 285, in _assert_topic
    return _registered_assertions[method_name](self.topic, *args, **kw)
              File "/home/metal/debian/preggy/preggy/core.py", line 58, in wrapper
    func(*args, **kw)
              File "/home/metal/debian/preggy/preggy/core.py", line 126, in test_assertion
    raise AssertionError(err_msg)
AssertionError: Expected topic('setup\ntopic\n') to equal 'setup\ntopic\nteardown\n'


             found in /home/metal/work/pyvows/tests/captured_output_vows.py at line 27 

        Top context stderr
        ✗ has setup topic teardown err
            Expected topic('setup-err\ntopic-err\n') to equal 'setup-err\ntopic-err\nteardown-err\n'

Traceback (most recent call last):
              File "/home/metal/work/pyvows/pyvows/runner/abc.py", line 65, in run_vow
    result = vow(ctx_obj, topic)
              File "/home/metal/work/pyvows/tests/captured_output_vows.py", line 35, in has_setup_topic_teardown_err
    expect(topic).to_equal('setup-err\ntopic-err\nteardown-err\n')
              File "/home/metal/debian/preggy/preggy/core.py", line 285, in _assert_topic
    return _registered_assertions[method_name](self.topic, *args, **kw)
              File "/home/metal/debian/preggy/preggy/core.py", line 58, in wrapper
    func(*args, **kw)
              File "/home/metal/debian/preggy/preggy/core.py", line 126, in test_assertion
    raise AssertionError(err_msg)
AssertionError: Expected topic('setup-err\ntopic-err\n') to equal 'setup-err\ntopic-err\nteardown-err\n'


             found in /home/metal/work/pyvows/tests/captured_output_vows.py at line 34 

  ✗ OK » 1023 honored • 4 broken • 0 skipped (0.486150s)


 ==============
 Slowest Topics
 ==============

  #  Elapsed     Context File Path                           Context Name
  1  0.46222s    skipping_vows.py                            Results When Vows Raise Exceptions
  2  0.46140s    skipping_vows.py                            Results When Topic Has Skip If False Decorator
  3  0.44860s    errors_in_topic_vows.py                     When Subcontext Topic Raises An Exception
  4  0.44349s    skipping_vows.py                            Results When Topic Raises A Skip Test Exception
  5  0.44349s    skipping_vows.py                            Results When Topic Has Skip Decorator
  6  0.44284s    skipping_vows.py                            Results When Topic Has Skip If True Decorator
  7  0.44277s    skipping_vows.py                            Results When Subcontext Has Skip Decorator
  8  0.43826s    filter_vows_to_run_vows.py                  Results Of Running Two Contexts With Conflicting Ignores
  9  0.42836s    captured_output_vows.py                     Results From Context That Explicitly Captures Output
 10  0.42834s    captured_output_vows.py                     Results From Context That Prints When Sys Streams Are Patched
()
Makefile:2: recipe for target 'test' failed
make: *** [test] Error 4
@gi11es
Copy link
Contributor

gi11es commented Jun 22, 2016

The second half of the regression came from heynemann/preggy@ff4f2c9

gi11es pushed a commit to gi11es/pyvows that referenced this issue Jun 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants