예제 #1
0
 def test_transform_kwargs_single_dash_string(self):
     expect = ['-abc']
     actual = git.transform_kwargs(a='bc')
     self.assertEqual(expect, actual)
예제 #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)
예제 #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)
예제 #4
0
 def test_transform_kwargs_single_dash_float(self):
     expect = ['-a1.5']
     actual = git.transform_kwargs(a=1.5)
     self.assertEqual(expect, actual)
예제 #5
0
def test_transform_double_single_dash_string():
    expect = ['--abc=def']
    actual = git.transform_kwargs(abc='def')
    assert expect == actual
예제 #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)
예제 #7
0
 def test_transform_kwargs_single_dash_string(self):
     expect = ['-abc']
     actual = git.transform_kwargs(a='bc')
     self.assertEqual(expect, actual)
예제 #8
0
def test_transform_kwargs_double_dash_float():
    expect = ['--abc=1.5']
    actual = git.transform_kwargs(abc=1.5)
    assert expect == actual
예제 #9
0
 def test_transform_kwargs_single_dash_float(self):
     expect = ['-a1.5']
     actual = git.transform_kwargs(a=1.5)
     self.assertEqual(expect, actual)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #14
0
def test_transform_kwargs_double_dash_int():
    expect = ['--abc=1']
    actual = git.transform_kwargs(abc=1)
    assert expect == actual
예제 #15
0
 def test_transform_double_single_dash_string(self):
     expect = ['--abc=def']
     actual = git.transform_kwargs(abc='def')
     self.assertEqual(expect, actual)
예제 #16
0
def test_transform_kwargs_single_dash_float():
    expect = ['-a1.5']
    actual = git.transform_kwargs(a=1.5)
    assert expect == actual
예제 #17
0
def test_transform_kwargs_empty():
    expect = []
    actual = git.transform_kwargs(foo=None, bar=False)
    assert expect == actual
예제 #18
0
def test_transform_kwargs_single_dash_string():
    expect = ['-abc']
    actual = git.transform_kwargs(a='bc')
    assert expect == actual
예제 #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
예제 #20
0
 def test_transform_kwargs_empty(self):
     expect = []
     actual = git.transform_kwargs(foo=None, bar=False)
     self.assertEqual(expect, actual)
예제 #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
예제 #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)
예제 #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
예제 #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)
예제 #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
예제 #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)
예제 #27
0
def test_transform_kwargs_single_dash_int():
    expect = ['-a1']
    actual = git.transform_kwargs(a=1)
    assert expect == actual
예제 #28
0
 def test_transform_double_single_dash_string(self):
     expect = ['--abc=def']
     actual = git.transform_kwargs(abc='def')
     self.assertEqual(expect, actual)
예제 #29
0
 def test_transform_kwargs_empty(self):
     expect = []
     actual = git.transform_kwargs(foo=None, bar=False)
     self.assertEqual(expect, actual)