hidung-selecttests adalah hidung plugin untuk menentukan daftar putih kata kunci untuk tes yang akan dijalankan oleh hidung.
Penggunaan
Contoh menggunakan plugin pada paket Plugin sendiri:
Jalankan semua tes:
$ Nosetests v
test_configure_complex (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_configure_empty_string (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_configure_none (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_configure_simple (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_is_selected_case_insensitive (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_is_selected_negative (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_is_selected_simple (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_is_selected_unselected (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_is_selected_unselected_override (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_is_selected_wildcard (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_options (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_prepareTestCase_exclude (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_prepareTestCase_select (noseselecttests.tests.NoseSelectPluginTest) ... ok
-------------------------------------------------- --------------------
Berlari 13 tes di 0.008s
OKE
Hanya menjalankan tes dengan kata kunci configure:
$ Nosetests v t mengkonfigurasi
test_configure_complex (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_configure_empty_string (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_configure_none (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_configure_simple (noseselecttests.tests.NoseSelectPluginTest) ... ok
-------------------------------------------------- --------------------
Ran 4 tes di 0.006s
OKE
Case sensitive:
$ Nosetests v t CONFIGURE
test_configure_complex (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_configure_empty_string (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_configure_none (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_configure_simple (noseselecttests.tests.NoseSelectPluginTest) ... ok
-------------------------------------------------- --------------------
Ran 4 tes di 0.006s
OKE
Hanya menjalankan tes dengan kata kunci configure tapi mengecualikan tes dengan kompleks kata kunci:
$ Nosetests v t configure -e kompleks
test_configure_empty_string (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_configure_none (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_configure_simple (noseselecttests.tests.NoseSelectPluginTest) ... ok
-------------------------------------------------- --------------------
Ran 3 tes di 0.006s
OKE
Untuk hanya mengecualikan beberapa tes, gunakan -e yang disediakan oleh hidung sendiri:
$ Nosetests v -e is_selected
test_configure_complex (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_configure_empty_string (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_configure_none (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_configure_simple (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_options (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_prepareTestCase_exclude (noseselecttests.tests.NoseSelectPluginTest) ... ok
test_prepareTestCase_select (noseselecttests.tests.NoseSelectPluginTest) ... ok
-------------------------------------------------- --------------------
Ran 7 tes di 0.005s
OK
Persyaratan :
- Python
- hidung
Komentar tidak ditemukan