• R/O
  • SSH

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

C preprocessor written in Python


Commit MetaInfo

Révisiond1f9849f38191cc29bea0c006894e18b930dc868 (tree)
l'heure2022-02-01 15:50:07
AuteurEric Hopper <hopper@omni...>
CommiterEric Hopper

Message de Log

Add test of negative indexes.

Change Summary

Modification

diff -r 962505cdb449 -r d1f9849f3819 tests/test_lazy_sequence.py
--- a/tests/test_lazy_sequence.py Mon Jan 31 22:45:43 2022 -0800
+++ b/tests/test_lazy_sequence.py Mon Jan 31 22:50:07 2022 -0800
@@ -34,6 +34,15 @@
3434 del tmp
3535 gc.collect()
3636
37+ with pytest.raises(ValueError):
38+ assert ls[-1] == 25
39+
40+ with pytest.raises(ValueError):
41+ assert ls[-1:] == [25]
42+
43+ with pytest.raises(ValueError):
44+ assert ls[:-1] == [9, 16, 25]
45+
3746 assert ls.index == 2
3847 assert len(ls.state.heads) == 1
3948 assert len(ls.state.buffer) == 0