question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parametrize mark returning error.

See original GitHub issue
test_name: example

strict: False 

marks:
  - parametrize:
      key: invalid_characters
      vals:
        - "!"
        - "@"
        - "#"
        - "$"
        - "%"
        - "^"
        - "*"
        - "("
        - ")"
        - "~"
        - "?"
        - ">"
        - "<"
        - "/"
        - "\\"
  - usefixtures:
      - get_org_name
      - get_org_name_long
  - stages:
  - name: Creating Organization (Invalid Characters)
    request:
      url: "{base_url}/organization"
      method: POST
      headers:
        X-DC-DEVKEY: "{api_key_admin1}"
      json:
        name: "{invalid_characters} {get_org_name}"
        country: US
        address: 1234 neat place st
        city: Houston
        state: Texas
        zip: 77001
        telephone: 801-888-8989
        container:
          id: "{container_id1}"
        organization_contact:
          first_name : new_contact_first
          last_name : new_contact_last
          job_title : CEO
          email : first.last@neworg.com
          telephone : 801-888-8899
          telephone_extension : 465
    response:
      status_code: 400

This throws an error of TypeError: _parse_parametrize_args() missing 1 required positional argument: 'argvalues'

I have tried running even simpler parametrized tests but get the same error every time.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
colbykbarton-digicertcommented, Jun 25, 2019

We have tried running this on tavern-0.26.3 and it works fine, the bug seems to be in tavern-0.26.4

0reactions
michaelboultoncommented, Aug 17, 2019

This is fixed in 0.26.5+ but the use of fixtures needs updating which might be a significant chunk of work

https://github.com/taverntesting/tavern/issues/367

Read more comments on GitHub >

github_iconTop Results From Across the Web

Py.test: How to parametrize when some values should return ...
I'm new at testing and wondering if it is possible to parametrize values that should return a value, and others that should return...
Read more >
Parametrizing tests — pytest documentation
For basic docs, see How to parametrize fixtures and test functions. ... return val.strftime("%Y%m%d") @pytest.mark.parametrize("a,b,expected", testdata, ...
Read more >
Pytest and Parametrization - Authentise
It has one return code path, and raises different errors depending on ... import pytest import some_code @pytest.mark.parametrize("input0, ...
Read more >
Deep dive into Pytest parametrization | by George Shuklin
Because we pass arguments to a Pytest decorator, we can't use any fixtures as arguments. They would be a wrong object type (if...
Read more >
pytest-cases
pytest-cases leverages pytest and its great @pytest.mark.parametrize decorator, ... the latter returning an expected error type and/or message for use with ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found