Skip to content

Commit 277422e

Browse files
authored
Initial commit
0 parents  commit 277422e

File tree

6 files changed

+167
-0
lines changed

6 files changed

+167
-0
lines changed

.github/.keep

Whitespace-only changes.

.github/classroom/autograding.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"tests": [
3+
{
4+
"name": "Tests",
5+
"setup": "python3.10 -m pip install pytest pytest-console-scripts",
6+
"run": "python3.10 -m pytest tests.py",
7+
"input": "",
8+
"output": "",
9+
"comparison": "included",
10+
"timeout": 10,
11+
"points": null
12+
}
13+
]
14+
}

.github/workflows/classroom.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: GitHub Classroom Workflow
2+
3+
on: [push]
4+
5+
permissions:
6+
checks: write
7+
actions: read
8+
contents: read
9+
10+
jobs:
11+
build:
12+
name: Autograding
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.10"
18+
- uses: actions/checkout@v2
19+
- uses: education/autograding@v1

.gitignore

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
MANIFEST
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
.pytest_cache/
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
local_settings.py
57+
db.sqlite3
58+
59+
# Flask stuff:
60+
instance/
61+
.webassets-cache
62+
63+
# Scrapy stuff:
64+
.scrapy
65+
66+
# Sphinx documentation
67+
docs/_build/
68+
69+
# PyBuilder
70+
target/
71+
72+
# Jupyter Notebook
73+
.ipynb_checkpoints
74+
75+
# pyenv
76+
.python-version
77+
78+
# celery beat schedule file
79+
celerybeat-schedule
80+
81+
# SageMath parsed files
82+
*.sage.py
83+
84+
# Environments
85+
.env
86+
.venv
87+
env/
88+
venv/
89+
ENV/
90+
env.bak/
91+
venv.bak/
92+
93+
# Spyder project settings
94+
.spyderproject
95+
.spyproject
96+
97+
# Rope project settings
98+
.ropeproject
99+
100+
# mkdocs documentation
101+
/site
102+
103+
# mypy
104+
.mypy_cache/
105+
106+
# benchmarks
107+
.benchmarks/
108+
109+
# vim dev
110+
*.swp
111+
112+
# vscode
113+
.vscode/
114+
.DS_Store

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# L01E01: Hello world
2+
Vytvořte skript `hello_world.py`, který po spuštění vypíše `Hello world!`. Pozor, záleží na velikosti znaků a dalších detailech!
3+
4+
## Příklad výstupu
5+
```
6+
> python3 hello_world.py
7+
Hello world!
8+
```
9+
10+
## Lokální testování
11+
Funkčnost řešení ověříte následujícím příkazem:
12+
13+
```bash
14+
pytest tests.py
15+
```

tests.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
def test_output(script_runner):
2+
ret = script_runner.run("hello_world.py")
3+
assert ret.success
4+
assert ret.stdout == "Hello world!\n"
5+
assert ret.stderr == ""

0 commit comments

Comments
 (0)