Klimi's new dotfiles with stow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
659 B

4 years ago
  1. """Tests for elpy.tests.support. Yep, we test test code."""
  2. import unittest
  3. from elpy.tests.support import source_and_offset
  4. class TestSourceAndOffset(unittest.TestCase):
  5. def test_should_return_source_and_offset(self):
  6. self.assertEqual(source_and_offset("hello, _|_world"),
  7. ("hello, world", 7))
  8. def test_should_handle_beginning_of_string(self):
  9. self.assertEqual(source_and_offset("_|_hello, world"),
  10. ("hello, world", 0))
  11. def test_should_handle_end_of_string(self):
  12. self.assertEqual(source_and_offset("hello, world_|_"),
  13. ("hello, world", 12))