Quantcast

VCard unittests

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

VCard unittests

Paul Franklin-5
Some of you know that the VCard unittests fail.

Most of you who know that also know that for that
reason they are disabled in the Travis tests on github.

But I want to run all the unittests via the "setup.py test"
procedure and they aren't disabled there.  So I would
like to propose something which will cause them not
to be run there too. (And I don't think it will break Travis.)

mkdir gramps/plugins/importer/test.ignore

git mv gramps/plugins/importer/test/importvcard_test.py
gramps/plugins/importer/test.ignore

mkdir gramps/plugins/export/test.ignore

git mv gramps/plugins/export/test/exportvcard_test.py mkdir
gramps/plugins/export/test.ignore

That will keep both of them around, in case we ever
have a developer who has the time, interest, etc., to
fix them.

The critical point is that neither of the new directories
will have any __init__.py file and so they will be skipped
when the unittest.TestLoader().discover crawls our tree
looking for files (which match our pattern).

It worked for me.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VCard unittests

Paul Franklin-5
My mailer broke up the two "git mv" lines into two
lines, but of course they should each be on one.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VCard unittests

prculley
In reply to this post by Paul Franklin-5
FWIW, I looked at those tests back when I was developing the import and export tests.  In fact I got the VCARD import test running well enough to use its intermediate files as the basis of my import test.  Accordingly, I think my import test is (almost) as good as the original.  I say almost, since I did not cover the error cases originally tested when they would have required multiple runs (and some extra test code) to cover them.

I did not examine the original export test; but I feel that the current method of testing output against a reference result gives us a pretty good check against unexpected changes.

Since Github (and Git) keeps all commits anyway, would it be easier to just delete them?  Maybe with a quick note on our wiki page where we talk about tests that these are dropped, but used to be used.

Paul Culley

On Wed, Feb 22, 2017 at 11:05 PM, Paul Franklin <[hidden email]> wrote:
Some of you know that the VCard unittests fail.

Most of you who know that also know that for that
reason they are disabled in the Travis tests on github.

But I want to run all the unittests via the "setup.py test"
procedure and they aren't disabled there.  So I would
like to propose something which will cause them not
to be run there too. (And I don't think it will break Travis.)

mkdir gramps/plugins/importer/test.ignore

git mv gramps/plugins/importer/test/importvcard_test.py
gramps/plugins/importer/test.ignore

mkdir gramps/plugins/export/test.ignore

git mv gramps/plugins/export/test/exportvcard_test.py mkdir
gramps/plugins/export/test.ignore

That will keep both of them around, in case we ever
have a developer who has the time, interest, etc., to
fix them.

The critical point is that neither of the new directories
will have any __init__.py file and so they will be skipped
when the unittest.TestLoader().discover crawls our tree
looking for files (which match our pattern).

It worked for me.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VCard unittests

Nick Hall
In reply to this post by Paul Franklin-5
On 23/02/17 05:05, Paul Franklin wrote:
> Some of you know that the VCard unittests fail.
>
> Most of you who know that also know that for that
> reason they are disabled in the Travis tests on github.

I have fixed the tests and enabled them again.

Nick.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VCard unittests

Paul Franklin-5
On 2/23/17, Nick Hall <[hidden email]> wrote:
> I have fixed the tests and enabled them again.

Thank you.


I wonder whether "jsonschema" should be put into the
README (since it apparently isn't on my machine)?

(I have ignored the "lxml" message for a long time, though.)

(Similarly, I assume the borked/rubish typeout has to
happen, that it can't somehow be told to expect a failure.)

(And likewise for the twenty RotateHandlerTest typeouts.)

(Which leaves only the 29/2/1875 ImportGeneWeb typeout.)

Thanks again.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VCard unittests

Nick Hall
On 24/02/17 04:14, Paul Franklin wrote:
> I wonder whether "jsonschema" should be put into the
> README (since it apparently isn't on my machine)?

The jsonschema module is used for JSON Schema validation.  However the
schema is not used anywhere yet, and JSON is only used for import/export.

>
> (I have ignored the "lxml" message for a long time, though.)

This is another optional module used in some third-party addons.

>
> (Similarly, I assume the borked/rubish typeout has to
> happen, that it can't somehow be told to expect a failure.)
>
> (And likewise for the twenty RotateHandlerTest typeouts.)
>
> (Which leaves only the 29/2/1875 ImportGeneWeb typeout.)
>
Feel free to suppress any such output in the unit tests.


Nick.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Loading...