Implemented project structure

This commit is contained in:
Fabio Scotto di Santolo
2025-11-29 18:39:57 +01:00
commit c59b4004e5
6024 changed files with 1100108 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
This is a sample doctest in a text file.
In this example, we'll rely on a global variable being set for us
already:
>>> favorite_color
'blue'
We can make this fail by disabling the blank-line feature.
>>> if 1:
... print('a')
... print()
... print('b')
a
<BLANKLINE>
b

View File

@@ -0,0 +1,14 @@
This is a sample doctest in a text file.
In this example, we'll rely on some silly setup:
>>> import test.test_doctest.test_doctest
>>> test.test_doctest.test_doctest.sillySetup
True
This test also has some (random) encoded (utf-8) unicode text:
ЉЊЈЁЂ
This doesn't cause a problem in the tect surrounding the examples, but
we include it here (in this test text file) to make sure. :)

View File

@@ -0,0 +1,5 @@
Here we check that `__file__` is provided:
>>> type(__file__)
<class 'str'>

View File

@@ -0,0 +1,11 @@
This is a sample doctest in a text file that contains non-ASCII characters.
This file is encoded using UTF-8.
In order to get this test to pass, we have to manually specify the
encoding.
>>> 'föö'
'f\xf6\xf6'
>>> 'bąr'
'b\u0105r'

View File

@@ -0,0 +1,14 @@
This is a sample doctest in a text file, in which all examples fail
or raise an exception.
>>> 2 + 2
5
>>> 1/0
1
>>> def f():
... 2 + '2'
...
>>> f()
1
>>> 2+*3
5

View File

@@ -0,0 +1,6 @@
This is a sample doctest in a text file, in which all examples are skipped.
>>> 2 + 2 # doctest: +SKIP
5
>>> 2 + 2 # doctest: +SKIP
4

View File

@@ -0,0 +1,6 @@
This is a sample doctest in a text file, in which some examples are skipped.
>>> 2 + 2 # doctest: +SKIP
5
>>> 2 + 2
4