Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Not able to execute tests as mentioned in README.md #46

Open
shraddha-aangiras opened this issue Nov 13, 2022 · 1 comment
Open

Not able to execute tests as mentioned in README.md #46

shraddha-aangiras opened this issue Nov 13, 2022 · 1 comment

Comments

@shraddha-aangiras
Copy link

shraddha-aangiras commented Nov 13, 2022

pytest red_queen/games/mapping/map_queko.py -m tweedledum --store
Namespace(assertmode='rewrite', basetemp=None, cacheclear=False, cacheshow=None, capture='fd', code_highlight='yes', collect_in_virtualenv=False, collectonly=False, color='auto', confcutdir=None, continue_on_collection_errors=False, debug=None, deselect=None, disable_warnings=False, doctest_continue_on_failure=False, doctest_ignore_import_errors=False, doctestglob=[], doctestmodules=False, doctestreport='udiff', durations=None, durations_min=0.005, failedfirst=False, file_or_dir=['red_queen/games/mapping/map_queko.py'], fulltrace=False, help=False, ignore=None, ignore_glob=None, importmode='prepend', inifilename=None, junitprefix=None, keepduplicates=False, keyword='', last_failed_no_failures='all', lf=False, log_auto_indent=None, log_cli_date_format=None, log_cli_format=None, log_cli_level=None, log_date_format=None, log_file=None, log_file_date_format=None, log_file_format=None, log_file_level=None, log_format=None, log_level=None, markers=False, markexpr='tweedledum', maxfail=0, newfirst=False, no_header=False, no_summary=False, noconftest=False, num_pawns=0, override_ini=None, pastebin=None, plugins=[], pyargs=False, pythonwarnings=None, reportchars='fE', rootdir=None, runxfail=False, setuponly=False, setupplan=False, setupshow=False, show_fixtures_per_test=False, showcapture='all', showfixtures=False, showlocals=False, stepwise=False, stepwise_skip=False, storage_dir=PosixPath('results'), store_data=True, strict=False, strict_config=False, strict_markers=False, tbstyle='auto', trace=False, traceconfig=False, usepdb=False, usepdb_cls=None, verbose=0, version=0, xmlpath=None)
/home/vagrant/red-queen/red_queen/queen.py:35: PytestDeprecationWarning: The hookimpl RedQueen.pytest_sessionstart uses old-style configuration options (marks or attributes).
Please use the pytest.hookimpl(trylast=True) decorator instead
 to configure the hooks.
 See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers
  @pytest.mark.trylast
============================= test session starts ==============================
platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/vagrant/red-queen, configfile: pytest.ini

=============================== warnings summary ===============================
../../../Users/Shraddha/red-queen/conftest.py:52
  /Users/Shraddha/red-queen/conftest.py:52: PytestDeprecationWarning: The hookimpl pytest_configure uses old-style configuration options (marks or attributes).
  Please use the pytest.hookimpl(trylast=True) decorator instead
   to configure the hooks.
   See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================== 1 warning in 0.02s ==================

When I run tests they are failing with above error. No tests were run. Please let me know how to fix them.

@mtreinish
Copy link
Member

It's hard to debug this solely from that output. All this output really means is that for some reason pytest's discovery is not able to find any tests at the specified path. This normally points to a python environment issue that is likely causing an import error or something else that is causing pytest to think there isn't any tests at the path specified. You can try running pytest with more verbose output to debug this: pytest --verbose --full-trace red_queen/games/mapping/map_queko.py -m tweedledum --store but that may not actually include any extra output. The other thing you can try is running python on the file instead of pytest to see if there is any output from python trying to load the file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants