summaryrefslogtreecommitdiffstats
path: root/tests/test_stack.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_stack.py')
-rw-r--r--tests/test_stack.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_stack.py b/tests/test_stack.py
new file mode 100644
index 0000000..5bbb885
--- /dev/null
+++ b/tests/test_stack.py
@@ -0,0 +1,11 @@
+from rich._stack import Stack
+
+
+def test_stack():
+
+ stack = Stack()
+ stack.push("foo")
+ stack.push("bar")
+ assert stack.top == "bar"
+ assert stack.pop() == "bar"
+ assert stack.top == "foo"