Skip to content

Hooks not recognized when freezing with cx_Freeze #159

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

Open
The-Compiler opened this issue Oct 24, 2015 · 0 comments
Open

Hooks not recognized when freezing with cx_Freeze #159

The-Compiler opened this issue Oct 24, 2015 · 0 comments

Comments

@The-Compiler
Copy link
Member

This might be a pytest core issue as well, but I'm not sure - all my other plugins work fine, and I can't imagine pytest-bdd is the only one with custom hooks.

When running the tests frozen with cx_Freeze, after working around #158, I get:

____________________________________________ test_going_backforward ____________________________________________

request = <FixtureRequest for <Function 'test_going_backforward'>>

>   ???

tests/integration/features/test_features.py:41: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

feature = <pytest_bdd.feature.Feature object at 0x7f40b4716da0>
scenario = <pytest_bdd.feature.Scenario object at 0x7f40b4716e80>
request = <FixtureRequest for <Function 'test_going_backforward'>>, encoding = 'utf-8'

    def _execute_scenario(feature, scenario, request, encoding):
        """Execute the scenario.

        :param feature: Feature.
        :param scenario: Scenario.
        :param request: request.
        :param encoding: Encoding.
        """
>       request.config.hook.pytest_bdd_before_scenario(
            request=request,
            feature=feature,
            scenario=scenario,
        )
E       AttributeError: 'HookRelay' object has no attribute 'pytest_bdd_before_scenario'

.tox/unittests-frozen/lib/python3.4/site-packages/pytest_bdd/scenario.py:148: AttributeError

After commenting out all the hook calls, it works fine... I also tried the branch from #149 but that didn't help.

Any idea why this is happening?

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

1 participant