Skip to content

Commit e44e525

Browse files
committed
Update pkg_resources errors to be compatible with newer packaging
1 parent 2aad1a0 commit e44e525

File tree

1 file changed

+39
-16
lines changed

1 file changed

+39
-16
lines changed

pkg_resources/api_tests.txt

+39-16
Original file line numberDiff line numberDiff line change
@@ -338,49 +338,72 @@ Environment Markers
338338
>>> import os
339339

340340
>>> print(im("sys_platform"))
341-
Invalid marker: 'sys_platform', parse error at ''
341+
Expected marker operator, one of <=, <, !=, ==, >=, >, ~=, ===, in, not in
342+
sys_platform
343+
^
342344

343345
>>> print(im("sys_platform=="))
344-
Invalid marker: 'sys_platform==', parse error at ''
346+
Expected a marker variable or quoted string
347+
sys_platform==
348+
^
345349

346350
>>> print(im("sys_platform=='win32'"))
347351
False
348352

349353
>>> print(im("sys=='x'"))
350-
Invalid marker: "sys=='x'", parse error at "sys=='x'"
354+
Expected a marker variable or quoted string
355+
sys=='x'
356+
^
351357

352358
>>> print(im("(extra)"))
353-
Invalid marker: '(extra)', parse error at ')'
359+
Expected marker operator, one of <=, <, !=, ==, >=, >, ~=, ===, in, not in
360+
(extra)
361+
^
354362

355363
>>> print(im("(extra"))
356-
Invalid marker: '(extra', parse error at ''
364+
Expected marker operator, one of <=, <, !=, ==, >=, >, ~=, ===, in, not in
365+
(extra
366+
^
357367

358368
>>> print(im("os.open('foo')=='y'"))
359-
Invalid marker: "os.open('foo')=='y'", parse error at 'os.open('
369+
Expected a marker variable or quoted string
370+
os.open('foo')=='y'
371+
^
360372

361373
>>> print(im("'x'=='y' and os.open('foo')=='y'")) # no short-circuit!
362-
Invalid marker: "'x'=='y' and os.open('foo')=='y'", parse error at 'and os.o'
374+
Expected a marker variable or quoted string
375+
'x'=='y' and os.open('foo')=='y'
376+
^
363377

364378
>>> print(im("'x'=='x' or os.open('foo')=='y'")) # no short-circuit!
365-
Invalid marker: "'x'=='x' or os.open('foo')=='y'", parse error at 'or os.op'
366-
367-
>>> print(im("'x' < 'y' < 'z'"))
368-
Invalid marker: "'x' < 'y' < 'z'", parse error at "< 'z'"
379+
Expected a marker variable or quoted string
380+
'x'=='x' or os.open('foo')=='y'
381+
^
369382

370383
>>> print(im("r'x'=='x'"))
371-
Invalid marker: "r'x'=='x'", parse error at "r'x'=='x"
384+
Expected a marker variable or quoted string
385+
r'x'=='x'
386+
^
372387

373388
>>> print(im("'''x'''=='x'"))
374-
Invalid marker: "'''x'''=='x'", parse error at "'x'''=='"
389+
Expected marker operator, one of <=, <, !=, ==, >=, >, ~=, ===, in, not in
390+
'''x'''=='x'
391+
^
375392

376393
>>> print(im('"""x"""=="x"'))
377-
Invalid marker: '"""x"""=="x"', parse error at '"x"""=="'
394+
Expected marker operator, one of <=, <, !=, ==, >=, >, ~=, ===, in, not in
395+
"""x"""=="x"
396+
^
378397

379398
>>> print(im(r"x\n=='x'"))
380-
Invalid marker: "x\\n=='x'", parse error at "x\\n=='x'"
399+
Expected a marker variable or quoted string
400+
x\n=='x'
401+
^
381402

382403
>>> print(im("os.open=='y'"))
383-
Invalid marker: "os.open=='y'", parse error at 'os.open='
404+
Expected a marker variable or quoted string
405+
os.open=='y'
406+
^
384407

385408
>>> em("sys_platform=='win32'") == (sys.platform=='win32')
386409
True

0 commit comments

Comments
 (0)