Home | History | Annotate | Download | only in test

Lines Matching refs:Namespace

1703         def __call__(self, parser, namespace, value, option_string=None):
1717 assert expected_ns == namespace, ('expected %s, got %s' %
1718 (expected_ns, namespace))
1722 setattr(namespace, 'spam', value)
1726 def __call__(self, parser, namespace, value, option_string=None):
1743 assert expected_ns == namespace, ('expected %s, got %s' %
1744 (expected_ns, namespace))
1748 setattr(namespace, 'badger', value)
1770 def __call__(self, parser, namespace, values, option_string=None):
1771 setattr(namespace, self.dest, 'foo[%s]' % values)
2898 # Namespace 'contains' tests
2904 ns = argparse.Namespace()
2909 ns = argparse.Namespace(x=1, y=2)
4528 ns = argparse.Namespace(foo=42, bar='spam')
4529 string = "Namespace(bar='spam', foo=42)"
4533 ns = argparse.Namespace(**{'"': 'quote'})
4534 string = """Namespace(**{'"': 'quote'})"""
4538 ns = argparse.Namespace(a=1, **{'"': 'quote'})
4539 string = """Namespace(a=1, **{'"': 'quote'})"""
4543 ns = argparse.Namespace(**{'valid': True})
4544 string = "Namespace(valid=True)"
4556 # Namespace tests
4562 ns = argparse.Namespace()
4565 ns = argparse.Namespace(a=42, b='spam')
4570 ns1 = argparse.Namespace(a=1, b=2)
4571 ns2 = argparse.Namespace(b=2, a=1)
4572 ns3 = argparse.Namespace(a=1)
4573 ns4 = argparse.Namespace(b=2)
4587 ns = argparse.Namespace(a=1, b=2)