MCPcopy Create free account
hub / github.com/huggingface/transformers / test_basic

Method test_basic

tests/test_hf_argparser.py:73–81  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

71 self.assertEqual(xx, yy)
72
73 def test_basic(self):
74 parser = HfArgumentParser(BasicExample)
75
76 expected = argparse.ArgumentParser()
77 expected.add_argument("--foo", type=int, required=True)
78 expected.add_argument("--bar", type=float, required=True)
79 expected.add_argument("--baz", type=str, required=True)
80 expected.add_argument("--flag", action="store_true")
81 self.argparsersEqual(parser, expected)
82
83 def test_with_default(self):
84 parser = HfArgumentParser(WithDefaultExample)

Callers

nothing calls this directly

Calls 2

argparsersEqualMethod · 0.95
HfArgumentParserClass · 0.90

Tested by

no test coverage detected