Skip to content

Commit

Permalink
more fix for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjm97 committed Nov 28, 2024
1 parent 5e5194e commit 95c6207
Showing 1 changed file with 13 additions and 26 deletions.
39 changes: 13 additions & 26 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ def test_get_git_url_no_remote(self) -> None:

def test_get_git_version(self) -> None:
git_version = self.git_info.get_git_version()
self.assertEqual(len(git_version), 3)
self.assertIsInstance(git_version, tuple)
for v in git_version:
self.assertIsInstance(v, int)
Expand Down Expand Up @@ -245,9 +244,7 @@ class TypedVariable:

def test_separated_variables(self):
class SeparatedVariable:
"""Comment
"""
"""Comment"""

arg_1: str

Expand All @@ -263,9 +260,7 @@ def func(self):

def test_commented_variables(self):
class CommentedVariable:
"""Comment
"""
"""Comment"""

arg_1: str # Arg 1 comment

Expand All @@ -286,10 +281,10 @@ def func(self):

def test_bad_spacing_multiline(self):
class TrickyMultiline:
""" This is really difficult
"""This is really difficult
so
so very difficult
so
so very difficult
"""

foo: str = "my" # Header line
Expand Down Expand Up @@ -322,36 +317,28 @@ class TripleQuoteMultiline:
def test_comments_with_quotes(self):
class MultiquoteMultiline:
bar: int = 0
'\'\'biz baz\''
"''biz baz'"

hi: str
"\"Hello there\"\""
'"Hello there""'

class_variables = {}
class_variables['bar'] = {'comment': "''biz baz'"}
class_variables['hi'] = {'comment': '"Hello there""'}
class_variables["bar"] = {"comment": "''biz baz'"}
class_variables["hi"] = {"comment": '"Hello there""'}
self.assertEqual(get_class_variables(MultiquoteMultiline), class_variables)

def test_multiline_argument(self):
class MultilineArgument:
bar: str = (
"This is a multiline argument"
" that should not be included in the docstring"
)
bar: str = "This is a multiline argument" " that should not be included in the docstring"
"""biz baz"""

class_variables = {"bar": {"comment": "biz baz"}}
self.assertEqual(get_class_variables(MultilineArgument), class_variables)

def test_multiline_argument_with_final_hashtag_comment(self):
class MultilineArgumentWithHashTagComment:
bar: str = (
"This is a multiline argument"
" that should not be included in the docstring"
) # biz baz
barr: str = (
"This is a multiline argument"
" that should not be included in the docstring") # bar baz
bar: str = "This is a multiline argument" " that should not be included in the docstring" # biz baz
barr: str = "This is a multiline argument" " that should not be included in the docstring" # bar baz
barrr: str = ( # meow
"This is a multiline argument" # blah
" that should not be included in the docstring" # grrrr
Expand Down Expand Up @@ -563,7 +550,7 @@ def test_python_object_encoder_complex(self):

def test_python_object_encoder_unpicklable(self):
class CannotPickleThis:
"""Da na na na. Can't pickle this. """
"""Da na na na. Can't pickle this."""

def __init__(self):
self.x = 1
Expand Down

0 comments on commit 95c6207

Please sign in to comment.