-
Notifications
You must be signed in to change notification settings - Fork 4
Run tests that use pytest.figure #22
Comments
Hey Carl,
Not at my computer so I’ll say some more tomorrow but installing the
“pytest-datadir” package would fix that.
…On Wed, Aug 5, 2020 at 8:11 PM Carl Kadie ***@***.***> wrote:
Greetings,
I just learned about pytest fixtures an hour ago. It looks cool and
useful, but still don't understand what "params=[dict()]" does. Can you
help me run the tests?
I'm getting error message like "E fixture 'shared_datadir' not found". I
assume I need to configure something.
Thanks,
Carl
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#22>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOYVMCMC7SD4BR7DOICUOLR7HYMZANCNFSM4PWA7GFA>
.
|
That worked! Thanks (and now I see it in requirements-dev.txt)
From: Eric Czech <[email protected]>
Sent: Wednesday, August 05, 2020 5:33 PM
To: pystatgen/sgkit-plink <[email protected]>
Cc: Carl Kadie <[email protected]>; Author <[email protected]>
Subject: Re: [pystatgen/sgkit-plink] Run tests that use pytest.figure (#22)
Hey Carl,
Not at my computer so I’ll say some more tomorrow but installing the
“pytest-datadir” package would fix that.
On Wed, Aug 5, 2020 at 8:11 PM Carl Kadie ***@***.******@***.***>> wrote:
Greetings,
I just learned about pytest fixtures an hour ago. It looks cool and
useful, but still don't understand what "params=[dict()]" does. Can you
help me run the tests?
I'm getting error message like "E fixture 'shared_datadir' not found". I
assume I need to configure something.
Thanks,
Carl
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#22>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOYVMCMC7SD4BR7DOICUOLR7HYMZANCNFSM4PWA7GFA>
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpystatgen%2Fsgkit-plink%2Fissues%2F22%23issuecomment-669614523&data=02%7C01%7C%7C57e71ebc3ef74d47be5808d839a03887%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637322707584894937&sdata=Cb%2FpQaYawwgw3WZDTvI7GGn1KTxb8iYSrXs7jUfuv6U%3D&reserved=0>, or unsubscribe<https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABR65P7TUHEFZK2LOUSENV3R7H22JANCNFSM4PWA7GFA&data=02%7C01%7C%7C57e71ebc3ef74d47be5808d839a03887%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637322707584904933&sdata=ZyRUH7r8jCg2HaMCvdD2fVYpMiRwDtlMPMYP4XoBjog%3D&reserved=0>.
|
To say a little more about the pytest features, I think it's easiest to try to explain these bits of code in the tests: @pytest.fixture(params=[dict()])
def ds1(shared_datadir, request):
path = shared_datadir / example_dataset_1
return read_plink(path=path, bim_sep="\t", fam_sep="\t", **request.param)
def test_read_multi_path(shared_datadir, ds1):
...
@pytest.mark.parametrize("ds1", [dict(bim_int_contig=True)], indirect=True)
def test_read_int_contig(ds1):
... The I don't know any features of pytest-datadir other than that if you use the variable name The pytest.mark.parameterize feature is another one we make common use of, although the use of it in those tests specifically is somewhat atypical. Hope that helps. |
Greetings,
I just learned about pytest fixtures an hour ago. It looks cool and useful, but still don't understand what "params=[dict()]" does. Can you help me run the tests?
I'm getting error message like "E fixture 'shared_datadir' not found". I assume I need to configure something.
Thanks,
Carl
The text was updated successfully, but these errors were encountered: