def test_reindent_should_maintain_indentation(self): description = """\ Parameters: - a - b """ self.assertEqual( description, docformatter.reindent(description, indentation=' '))
def test_reindent_should_maintain_indentation(self): description = """\ Parameters: - a - b """ self.assertEqual( description, docformatter.reindent(description, indentation=' ') )
def test_reindent_with_no_indentation_expand_tabs(self): self.assertEqual( """\ The below should be indented with spaces: 1. This too. 2. And this. """, docformatter.reindent("""\ The below should be indented with spaces: \t1. This too. \t2. And this. """, indentation=''))
def test_reindent_should_expand_tabs_to_indentation(self): self.assertEqual( """\ This should be dedented. 1. This too. 2. And this. """, docformatter.reindent("""\ This should be dedented. 1. This too. \t2. And this. """, indentation=' '))
def test_reindent(self): self.assertEqual( """\ This should be dedented. 1. This too. 2. And this. """, docformatter.reindent("""\ This should be dedented. 1. This too. 2. And this. """, indentation=' '))
def test_reindent_should_expand_tabs_to_indentation(self): self.assertEqual( """\ This should be dedented. 1. This too. 2. And this. """, docformatter.reindent("""\ This should be dedented. 1. This too. \t2. And this. """, indentation=' ') )
def test_reindent(self): self.assertEqual( """\ This should be dedented. 1. This too. 2. And this. """, docformatter.reindent("""\ This should be dedented. 1. This too. 2. And this. """, indentation=' ') )
def test_reindent_with_no_indentation_expand_tabs(self): self.assertEqual( """\ The below should be indented with spaces: 1. This too. 2. And this. """, docformatter.reindent("""\ The below should be indented with spaces: \t1. This too. \t2. And this. """, indentation='') )