Skip to content

Commit

Permalink
add test for define with invalid args
Browse files Browse the repository at this point in the history
  • Loading branch information
kindermax authored and vmagamedov committed May 8, 2020
1 parent 59cde3f commit bad0e9c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,22 @@ def test_defined_signatures(self):
self.assertEqual(func_spec.keywords, None)
self.assertEqual(func_spec.defaults, None)

def test_defined_invalid_vargs(self):
with self.assertRaisesRegexp(
AssertionError, 'Variable args are not supported'
):
@define
def defined_func_with_kwargs(**kwargs):
pass

with self.assertRaisesRegexp(
AssertionError, 'Variable args are not supported'
):
@define
def defined_func_with_args(*args):
pass


def test_defined_calls(self):
c1 = self.a_cls.__table__.c.id
c2 = self.a_cls.__table__.c.name
Expand Down

0 comments on commit bad0e9c

Please sign in to comment.