Add test for str
@@ -303,3 +303,11 @@ assert_raises(StopIteration, lambda: next(str_iter_reversed))
assert str.__rmod__('%i', 30) == NotImplemented
assert_raises(TypeError, lambda: str.__rmod__(30, '%i'))
+
+# test str index
+index_str = 'Rust Python'
+
+assert index_str[0] == 'R'
+assert index_str[-1] == 'n'
+
+assert_raises(TypeError, lambda: index_str['a'])
