From c31579ebb81620691aed10b6cd90020d07f72982 Mon Sep 17 00:00:00 2001 From: danielenricocahall Date: Tue, 7 Apr 2020 19:05:40 -0400 Subject: [PATCH 1/2] add negative slicing test --- test/unit/test_superstring_functions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/unit/test_superstring_functions.py b/test/unit/test_superstring_functions.py index 748b898..eb46eaa 100644 --- a/test/unit/test_superstring_functions.py +++ b/test/unit/test_superstring_functions.py @@ -25,3 +25,7 @@ def test_split(super_string): def test_strip(): assert SuperString(" TESTING ").strip()._content == "TESTING" + + +def test_negative_slicing(super_string): + assert super_string[:-1]._content == 'es' \ No newline at end of file From 6da95ce4bf072aafd81ae1f272c9f962347724ad Mon Sep 17 00:00:00 2001 From: danielenricocahall Date: Tue, 7 Apr 2020 19:11:48 -0400 Subject: [PATCH 2/2] fix test --- test/unit/test_superstring_functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/test_superstring_functions.py b/test/unit/test_superstring_functions.py index eb46eaa..6709c9b 100644 --- a/test/unit/test_superstring_functions.py +++ b/test/unit/test_superstring_functions.py @@ -28,4 +28,4 @@ def test_strip(): def test_negative_slicing(super_string): - assert super_string[:-1]._content == 'es' \ No newline at end of file + assert super_string[1:-1]._content == 'es' \ No newline at end of file