Giter VIP home page Giter VIP logo

vcrpy-cassette-mgr's Issues

Multiple cassettes found when tests have same base name

This issue is a result of fixing #1 in v1.1.2.

Now that cassette searching can match multiple files for a single test, if two tests share the same base name, the wrong cassette can be matched for a test.

Here is the new cassette matching code:

const matchingFiles = files.filter(file => file.startsWith(`${vcrDecorator.vcrTestName}`) && file.endsWith('.yaml'));

Here are some example test names:

test_msteams_service_emergency_address_create
test_msteams_service_emergency_address_create_without_latlon

These overlapping names will cause test_msteams_service_emergency_address_create to also match the cassettes for test_msteams_service_emergency_address_create_without_latlon.

This is also causing an issue during the deleteCassettesCurrentFile command. Where the same cassettes can become duplicated in the currentFileCassettesArray and will cause subsequent deletion failures.

No cassette found when test function is args are multiline

No cassette is found for the following example:

@pytest.mark.vcr
@pytest.mark.parametrize(
    "field, value",
    [
        ("addressDescription", "Fake Address"),
        ("addressDescription", ""),
        ("name", "Fake Location"),
        ("name", ""),
    ],
)
def test_msteams_service_emergency_location_update_bad_raises(
    mstsc, field, value, emer_addr
):

I think its due to the (args) being multiline. Need to investigate further.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.