From 567bc646a7b1298d782d23599ad169f13441fa60 Mon Sep 17 00:00:00 2001 From: KiranAkadas Date: Tue, 1 Oct 2019 13:41:16 +0530 Subject: [PATCH 1/3] Added the GH Issue number note to Writing Tests in Docs --- doc/source/development/contributing.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/source/development/contributing.rst b/doc/source/development/contributing.rst index 3cdf9b83e96f3..c2ce3d6689ad0 100644 --- a/doc/source/development/contributing.rst +++ b/doc/source/development/contributing.rst @@ -949,6 +949,11 @@ the expected correct result:: assert_frame_equal(pivoted, expected) +.. note:: + + Add the GitHub Issue Number as a Comment to the New Tests. + + Transitioning to ``pytest`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~ From f907864acc6b8c030830c25752abf294fe2ece0d Mon Sep 17 00:00:00 2001 From: KiranAkadas Date: Wed, 2 Oct 2019 01:55:06 +0530 Subject: [PATCH 2/3] Added the note with example --- doc/source/development/contributing.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/source/development/contributing.rst b/doc/source/development/contributing.rst index c2ce3d6689ad0..c1889aa3b2d93 100644 --- a/doc/source/development/contributing.rst +++ b/doc/source/development/contributing.rst @@ -950,9 +950,13 @@ the expected correct result:: assert_frame_equal(pivoted, expected) .. note:: - - Add the GitHub Issue Number as a Comment to the New Tests. - + + Add the GitHub issue number as a comment to the new tests. + For Example - For a test solving issue number 20172, write + | # GH 20172 + | def test_apply_categorical_with_nan_values(self, series): + | s = pd.Series(series, dtype="category") + | ... Transitioning to ``pytest`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 6c04c15d8feac2afa7d784ae678b11033fa2efae Mon Sep 17 00:00:00 2001 From: KiranAkadas Date: Wed, 2 Oct 2019 10:36:20 +0530 Subject: [PATCH 3/3] Added the note with example (corrected) --- doc/source/development/contributing.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/source/development/contributing.rst b/doc/source/development/contributing.rst index c1889aa3b2d93..97807d3c9e686 100644 --- a/doc/source/development/contributing.rst +++ b/doc/source/development/contributing.rst @@ -950,11 +950,11 @@ the expected correct result:: assert_frame_equal(pivoted, expected) .. note:: - + Add the GitHub issue number as a comment to the new tests. - For Example - For a test solving issue number 20172, write - | # GH 20172 + For Example - For a test solving issue number 20172, write | def test_apply_categorical_with_nan_values(self, series): + | # GH 20172 | s = pd.Series(series, dtype="category") | ...