Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.

9 downloads

dbbasic-object-server/tests/test_no_syntax_warnings.py
Install on DigitalOcean Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-object-server.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-object-server.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-object-server.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

Daniel Quellhorst Changelog for this batch. 65ef78d 3 hours, 18 minutes ago History
test_no_syntax_warnings.py · 585 bytes · 18 lines
1"""Source files must compile without SyntaxWarning (invalid escape sequences etc.)."""
2import subprocess
3import sys
4import warnings
5from pathlib import Path
6
7import pytest
8
9ROOT = Path(__file__).resolve().parent.parent
10FILES = sorted(ROOT.glob("*.py")) + sorted((ROOT / "packages").rglob("*.py"))
11
12
13@pytest.mark.parametrize("path", FILES, ids=lambda p: str(p.relative_to(ROOT)))
14def test_compiles_without_warnings(path):
15 source = path.read_text(encoding="utf-8")
16 with warnings.catch_warnings():
17 warnings.simplefilter("error")
18 compile(source, str(path), "exec")