FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-43995: Fix test_grammar by erlend-aasland · Pull Request #25764 · python/cpython · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
9 changes: 5 additions & 4 deletions Lib/test/test_grammar.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# This just tests whether the parser accepts them all.

from test.support import check_syntax_error
from test.support import import_helper
from test.support.warnings_helper import check_syntax_warning
import inspect
import unittest
Expand Down Expand Up @@ -392,13 +393,13 @@ def test_var_annot_module_semantics(self):
def test_var_annot_in_module(self):
# check that functions fail the same way when executed
# outside of module where they were defined
from test.ann_module3 import f_bad_ann, g_bad_ann, D_bad_ann
ann_module3 = import_helper.import_fresh_module("test.ann_module3")
with self.assertRaises(NameError):
f_bad_ann()
ann_module3.f_bad_ann()
with self.assertRaises(NameError):
g_bad_ann()
ann_module3.g_bad_ann()
with self.assertRaises(NameError):
D_bad_ann(5)
ann_module3.D_bad_ann(5)

def test_var_annot_simple_exec(self):
gns = {}; lns= {}
Expand Down

Back | FazBrowse Home | New Git URL