Coder Social home page Coder Social logo

Comments (7)

brywiser avatar brywiser commented on May 24, 2024

I see the same issue as well.

from gauge-python.

kashishm avatar kashishm commented on May 24, 2024

@thelettermegan @brywiser It's working as expected for me. Can you replicate this issue on a sample project? If so, please update the issue with specification and implementation text.

Here's my working example

Spec

Spec
====
Scenario
--------
* put
* get

Impl

from getgauge.python import step, DataStoreFactory

@step('put')
def put():
    DataStoreFactory.scenario_data_store().put('a', 'b')


@step('get')
def get():
    assert DataStoreFactory.scenario_data_store().get('a') == 'b'

from gauge-python.

thelettermegan avatar thelettermegan commented on May 24, 2024

I was able to used the scenario_data_store().get inside the step function, but not when the step function calls a method that contains the scenario_data_store()

from gauge-python.

brywiser avatar brywiser commented on May 24, 2024

When we implement the scenario data store using the sample setup you mention above. It works as expected. However, I use the suite_data_store and it works outside of the step functions. So for example, we write our code in a page object pattern. I call a function from the step implementation that is in another class than the actual step. And that works, when we tried that with the scenario store, it didn't work as we expected. Does that make sense? I can put some sample code up if needed.

from gauge-python.

kashishm avatar kashishm commented on May 24, 2024

@thelettermegan @brywiser It'd really help if you could provide a sample project or code snippets to replicate this issue.

from gauge-python.

brywiser avatar brywiser commented on May 24, 2024

@kashishm Sorry for the delay. We are still working through getting you some sample code now. Sorry! We got hung up in some other work here!

from gauge-python.

thelettermegan avatar thelettermegan commented on May 24, 2024

Hey Kashishm, Thanks for waiting on this! I'm working with a large page object model framework and tried to replicate it here: https://github.com/thelettermegan/gauge_dataStore_keyError

Ironically, I was unable to replicate the bug! I'm going to close this now, and if I can figure out what exactly was the issue I'll open a new one.

Thanks again for your patience!!!

from gauge-python.

Related Issues (20)

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.