]> crepu.dev Git - config.git/blame_incremental - djavu-asus/elpa/elpy-20230803.1455/elpy/tests/test_support.py
Actualizado el Readme
[config.git] / djavu-asus / elpa / elpy-20230803.1455 / elpy / tests / test_support.py
... / ...
CommitLineData
1"""Tests for elpy.tests.support. Yep, we test test code."""
2
3import unittest
4
5from elpy.tests.support import source_and_offset
6
7
8class TestSourceAndOffset(unittest.TestCase):
9 def test_should_return_source_and_offset(self):
10 self.assertEqual(source_and_offset("hello, _|_world"),
11 ("hello, world", 7))
12
13 def test_should_handle_beginning_of_string(self):
14 self.assertEqual(source_and_offset("_|_hello, world"),
15 ("hello, world", 0))
16
17 def test_should_handle_end_of_string(self):
18 self.assertEqual(source_and_offset("hello, world_|_"),
19 ("hello, world", 12))