How to skip test in %pyunittest?
Hello, I would like to know how to skip specific test in %pyunittest. For example, pytest can skip some test like this, %pytest -k 'not some_test'. but how to do it for %pyunittest? Kind regards, Andy
I use: sed -Ei 's/(testEncodeArrayLike|testEncodeStringLike)/_\1/' test/test_demjson.py https://build.opensuse.org/request/show/864629 On Wed, Jan 20, 2021 at 5:40 PM andythe_great <andythe_great@protonmail.com> wrote:
Hello,
I would like to know how to skip specific test in %pyunittest. For example, pytest can skip some test like this, %pytest -k 'not some_test'. but how to do it for %pyunittest?
Kind regards, Andy
-- John Vandenberg
andythe_great píše v St 20. 01. 2021 v 09:40 +0000:
I would like to know how to skip specific test in %pyunittest. For example, pytest can skip some test like this, %pytest -k 'not some_test'. but how to do it for %pyunittest?
To be completely clear: python3 -munittest just doesn't have an equivalent to pytest's -k option. So there are two choices: hack like the one mentioned by John, or patch adding @unittest.skip annotations to particular tests. Best, Matěj -- https://matej.ceplovi.cz/blog/, Jabber: mcepl@ceplovi.cz GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 A man once asked Mozart how to write a symphony. Mozart told him to study at the conservatory for six or eight years, then apprentice with a composer for four or five more years, then begin writing a few sonatas, pieces for string quartets, piano concertos, etc. and in another four or five years he would be ready to try a full symphony. The man said, "But Mozart, didn't you write a symphony at age eight?" Mozart replied, "Yes, but I didn't have to ask how." -- ripped from another sig
participants (3)
-
andythe_great
-
jayvdb@gmail.com
-
Matěj Cepl