Lines Matching refs:expected_ns
80 def assertNamespaceMatches(self, result_ns, expected_ns): argument
87 expected_ns = expected_ns.copy()
91 if k not in expected_ns:
93 if k not in expected_ns["nested"]:
98 expected_spec = expected_ns.pop("__spec__")
114 self.assertEqual(set(result_ns), set(expected_ns))
117 expected = (k, expected_ns[k])
128 expected_ns = expected_namespace.copy()
129 run_name = expected_ns["__name__"]
134 self.assertNamespaceMatches(result_ns, expected_ns)
139 expected_ns["sentinel"] = sentinel
142 self.assertNamespaceMatches(result_ns, expected_ns)
151 expected_ns = example_namespace.copy()
152 expected_ns.update({
157 self.check_code_execution(create_ns, expected_ns)
167 expected_ns = example_namespace.copy()
168 expected_ns.update({
183 self.check_code_execution(create_ns, expected_ns)
296 expected_ns = example_namespace.copy()
297 expected_ns.update({
305 expected_ns.update({
314 self.check_code_execution(create_ns, expected_ns)
323 self._fix_ns_for_legacy_pyc(expected_ns, alter_sys)
324 self.check_code_execution(create_ns, expected_ns)
337 expected_ns = example_namespace.copy()
338 expected_ns.update({
346 expected_ns.update({
355 self.check_code_execution(create_ns, expected_ns)
364 self._fix_ns_for_legacy_pyc(expected_ns, alter_sys)
365 self.check_code_execution(create_ns, expected_ns)
542 expected_ns = example_namespace.copy()
543 expected_ns.update({
553 self.check_code_execution(create_ns, expected_ns)
609 expected_ns = example_namespace.copy()
623 expected_ns.update({
633 self.check_code_execution(create_ns, expected_ns)
643 expected_ns["__spec__"] = mod_spec
644 expected_ns["__name__"] = run_name
645 expected_ns["__package__"] = run_name.rpartition(".")[0]
646 self.check_code_execution(create_ns, expected_ns)