Skip to content

TST: add concrete examples of dataframe fixtures to docstrings #26593

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

Merged
merged 1 commit into from
Jun 1, 2019

Conversation

simonjayhawkins
Copy link
Member

add concrete examples of dataframe fixtures to docstrings to make it easier when looking for fixtures to reuse.

and also appear when using pytest --fixtures and pytest --fixtures-per-test so could be an aid to debugging

------------------ fixtures used by test_set_index_directly -------------------
----------------- (pandas\tests\frame\test_alter_axes.py:20) ------------------
add_imports
    no docstring available
configure_tests
    no docstring available
doctest_namespace
    Fixture that returns a :py:class:`dict` that will be injected into the namespace of doctests.
float_string_frame
    Fixture for DataFrame of floats and strings with index of unique strings

    Columns are ['A', 'B', 'C', 'D', 'foo'].

                       A         B         C         D  foo
    w3orJvq07g -1.594062 -1.084273 -1.252457  0.356460  bar
    PeukuVdmz2  0.109855 -0.955086 -0.809485  0.409747  bar
    ahp2KvwiM8 -1.533729 -0.142519 -0.154666  1.302623  bar
    3WSJ7BUCGd  2.484964  0.213829  0.034778 -2.327831  bar
    khdAmufk0U -0.193480 -0.743518 -0.077987  0.153646  bar
    LE2DZiFlrE -0.193566 -1.343194 -0.107321  0.959978  bar
    HJXSJhVn7b  0.142590  1.257603 -0.659409 -0.223844  bar
    ...              ...       ...       ...       ...  ...
    9a1Vypttgw -1.316394  1.601354  0.173596  1.213196  bar
    h5d1gVFbEy  0.609475  1.106738 -0.155271  0.294630  bar
    mK9LsTQG92  1.303613  0.857040 -1.019153  0.369468  bar
    oOLksd9gKH  0.558219 -0.134491 -0.289869 -0.951033  bar
    9jgoOjKyHg  0.058270 -0.496110 -0.413212 -0.852659  bar
    jZLDHclHAO  0.096298  1.267510  0.549206 -0.005235  bar
    lR0nxDp1C2 -2.119350 -0.794384  0.544118  0.145849  bar

    [30 rows x 5 columns]

@simonjayhawkins simonjayhawkins added the Testing pandas testing functions or related to the test suite label May 31, 2019
@codecov-io
Copy link

Codecov Report

Merging #26593 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #26593      +/-   ##
==========================================
- Coverage   91.84%   91.84%   -0.01%     
==========================================
  Files         174      174              
  Lines       50644    50644              
==========================================
- Hits        46516    46512       -4     
- Misses       4128     4132       +4
Flag Coverage Δ
#multiple 90.37% <ø> (ø) ⬆️
#single 41.68% <ø> (-0.12%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 78.94% <0%> (-10.53%) ⬇️
pandas/core/frame.py 97% <0%> (-0.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f31865...f109c21. Read the comment docs.

1 similar comment
@codecov-io
Copy link

codecov-io commented May 31, 2019

Codecov Report

Merging #26593 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #26593      +/-   ##
==========================================
- Coverage   91.84%   91.84%   -0.01%     
==========================================
  Files         174      174              
  Lines       50644    50644              
==========================================
- Hits        46516    46512       -4     
- Misses       4128     4132       +4
Flag Coverage Δ
#multiple 90.37% <ø> (ø) ⬆️
#single 41.68% <ø> (-0.12%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 78.94% <0%> (-10.53%) ⬇️
pandas/core/frame.py 97% <0%> (-0.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f31865...f109c21. Read the comment docs.

@jreback jreback added this to the 0.25.0 milestone Jun 1, 2019
@jreback jreback merged commit a498a2e into pandas-dev:master Jun 1, 2019
@jreback
Copy link
Contributor

jreback commented Jun 1, 2019

thanks @simonjayhawkins

@simonjayhawkins simonjayhawkins deleted the fixture-examples branch June 3, 2019 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants