Example #1
0
 def test_transform_kwargs_single_dash_string(self):
     expect = ['-abc']
     actual = git.transform_kwargs(a='bc')
     self.assertEqual(expect, actual)
Example #2
0
 def test_transform_kwargs_single_dash_from_True(self):
     """Single dash for one-character True"""
     expect = ['-a']
     actual = git.transform_kwargs(a=True)
     self.assertEqual(expect, actual)
Example #3
0
 def test_transform_kwargs_double_dash_from_True(self):
     """Double-dash for longer True"""
     expect = ['--abc']
     actual = git.transform_kwargs(abc=True)
     self.assertEqual(expect, actual)
Example #4
0
 def test_transform_kwargs_single_dash_float(self):
     expect = ['-a1.5']
     actual = git.transform_kwargs(a=1.5)
     self.assertEqual(expect, actual)
Example #5
0
def test_transform_double_single_dash_string():
    expect = ['--abc=def']
    actual = git.transform_kwargs(abc='def')
    assert expect == actual
Example #6
0
 def test_transform_kwargs_single_dash_from_True(self):
     """Single dash for one-character True"""
     expect = ['-a']
     actual = git.transform_kwargs(a=True)
     self.assertEqual(expect, actual)
Example #7
0
 def test_transform_kwargs_single_dash_string(self):
     expect = ['-abc']
     actual = git.transform_kwargs(a='bc')
     self.assertEqual(expect, actual)
Example #8
0
def test_transform_kwargs_double_dash_float():
    expect = ['--abc=1.5']
    actual = git.transform_kwargs(abc=1.5)
    assert expect == actual
Example #9
0
 def test_transform_kwargs_single_dash_float(self):
     expect = ['-a1.5']
     actual = git.transform_kwargs(a=1.5)
     self.assertEqual(expect, actual)
Example #10
0
 def test_transform_kwargs_double_dash_float(self):
     expect = ['--abc=1.5']
     actual = git.transform_kwargs(abc=1.5)
     self.assertEqual(expect, actual)
Example #11
0
 def test_transform_kwargs_no_double_dash_from_True(self):
     """No double-dash for False"""
     expect = []
     actual = git.transform_kwargs(abc=False)
     self.assertEqual(expect, actual)
Example #12
0
 def test_transform_kwargs_double_dash_from_True(self):
     """Double-dash for longer True"""
     expect = ['--abc']
     actual = git.transform_kwargs(abc=True)
     self.assertEqual(expect, actual)
Example #13
0
 def test_transform_kwargs_no_single_dash_from_False(self):
     """No single-dash for False"""
     expect = []
     actual = git.transform_kwargs(a=False)
     self.assertEqual(expect, actual)
Example #14
0
def test_transform_kwargs_double_dash_int():
    expect = ['--abc=1']
    actual = git.transform_kwargs(abc=1)
    assert expect == actual
Example #15
0
 def test_transform_double_single_dash_string(self):
     expect = ['--abc=def']
     actual = git.transform_kwargs(abc='def')
     self.assertEqual(expect, actual)
Example #16
0
def test_transform_kwargs_single_dash_float():
    expect = ['-a1.5']
    actual = git.transform_kwargs(a=1.5)
    assert expect == actual
Example #17
0
def test_transform_kwargs_empty():
    expect = []
    actual = git.transform_kwargs(foo=None, bar=False)
    assert expect == actual
Example #18
0
def test_transform_kwargs_single_dash_string():
    expect = ['-abc']
    actual = git.transform_kwargs(a='bc')
    assert expect == actual
Example #19
0
def test_transform_kwargs_single_dash_from_True():
    """Single dash for one-character True"""
    expect = ['-a']
    actual = git.transform_kwargs(a=True)
    assert expect == actual
Example #20
0
 def test_transform_kwargs_empty(self):
     expect = []
     actual = git.transform_kwargs(foo=None, bar=False)
     self.assertEqual(expect, actual)
Example #21
0
def test_transform_kwargs_no_single_dash_from_False():
    """No single-dash for False"""
    expect = []
    actual = git.transform_kwargs(a=False)
    assert expect == actual
Example #22
0
 def test_transform_kwargs_no_single_dash_from_False(self):
     """No single-dash for False"""
     expect = []
     actual = git.transform_kwargs(a=False)
     self.assertEqual(expect, actual)
Example #23
0
def test_transform_kwargs_double_dash_from_True():
    """Double-dash for longer True"""
    expect = ['--abc']
    actual = git.transform_kwargs(abc=True)
    assert expect == actual
Example #24
0
 def test_transform_kwargs_no_double_dash_from_True(self):
     """No double-dash for False"""
     expect = []
     actual = git.transform_kwargs(abc=False)
     self.assertEqual(expect, actual)
Example #25
0
def test_transform_kwargs_no_double_dash_from_True():
    """No double-dash for False"""
    expect = []
    actual = git.transform_kwargs(abc=False)
    assert expect == actual
Example #26
0
 def test_transform_kwargs_double_dash_float(self):
     expect = ['--abc=1.5']
     actual = git.transform_kwargs(abc=1.5)
     self.assertEqual(expect, actual)
Example #27
0
def test_transform_kwargs_single_dash_int():
    expect = ['-a1']
    actual = git.transform_kwargs(a=1)
    assert expect == actual
Example #28
0
 def test_transform_double_single_dash_string(self):
     expect = ['--abc=def']
     actual = git.transform_kwargs(abc='def')
     self.assertEqual(expect, actual)
Example #29
0
 def test_transform_kwargs_empty(self):
     expect = []
     actual = git.transform_kwargs(foo=None, bar=False)
     self.assertEqual(expect, actual)