Skip to content
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

Adds tests for battles #50

Merged
merged 10 commits into from
Jun 24, 2023
Merged

Adds tests for battles #50

merged 10 commits into from
Jun 24, 2023

Conversation

AoifeHughes
Copy link
Collaborator

This builds on #44 and should not be merged yet

@AoifeHughes
Copy link
Collaborator Author

This fails because asyncio testing is annoying - fix inc

@phinate phinate marked this pull request as ready for review June 23, 2023 15:30
@phinate
Copy link
Collaborator

phinate commented Jun 23, 2023

just coming to this now, thank you for the tests!!

i'm gonna make some changes now before getting this in:

  • mewtwo/eevee test is just testing the Player in poke-env, so gonna drop that
  • using pytest.parametrize a bit more for clearer test logs

@phinate
Copy link
Collaborator

phinate commented Jun 23, 2023

oh, and i saw you moved stuff to a new battling folder -- what was the reason for that? I was trying to keep all showdown/poke-env-related utils in the pokemon sub-module, if that helps explain the way it was

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@fd87a31). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #50   +/-   ##
=======================================
  Coverage        ?   43.98%           
=======================================
  Files           ?       15           
  Lines           ?      407           
  Branches        ?        0           
=======================================
  Hits            ?      179           
  Misses          ?      228           
  Partials        ?        0           

@phinate phinate merged commit 4125104 into main Jun 24, 2023
@phinate phinate deleted the testing/battles branch June 24, 2023 13:43
@AoifeHughes
Copy link
Collaborator Author

Still very confused how these tests are running on CI, for me:

(playground) ➜  P2-Lab git:(main) pytest
=========================================================== test session starts ============================================================
platform darwin -- Python 3.10.11, pytest-7.3.1, pluggy-1.0.0
rootdir: /Users/ahughes/git/P2-Lab
configfile: pyproject.toml
testpaths: tests
plugins: asyncio-0.21.0, cov-4.1.0, asyncio-cooperative-0.30.0, anyio-3.7.0
asyncio: mode=strict
collected 21 items

tests/test_battles.py ^[[A^C

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/Users/ahughes/miniconda3/envs/playground/lib/python3.10/selectors.py:562: KeyboardInterrupt
(to show a full traceback on KeyboardInterrupt use --full-trace)
==================================================== no tests ran in 379.78s (0:06:19) =====================================================
^C

I have to cancel out of them because they do not run without async tags on functions, awaits etc.

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

Successfully merging this pull request may close these issues.

3 participants