Skip to content

Commit

Permalink
Fix failing tests in python 3.8 (#426)
Browse files Browse the repository at this point in the history
* WIP: Fix failing tests in Python 3.8

* WIP: Fix failing tests in Python 3.8

* Fix failing tests
  • Loading branch information
harishmohanraj authored Jul 6, 2023
1 parent 4f7955e commit ae6b18d
Showing 1 changed file with 27 additions and 22 deletions.
49 changes: 27 additions & 22 deletions nbs/096_Docusaurus_Helper.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,13 @@
" pass\n",
"\n",
"s = signature(f)\n",
"\n",
"actual = []\n",
"expected = ['`int`', '`Optional[str]`', '`Dict[str, int]`', 'Any']\n",
"expected = (\n",
" ['`int`', '`Union[str, NoneType]`', '`Dict[str, int]`', 'Any']\n",
" if f\"{sys.version_info.major}.{sys.version_info.minor}\" == \"3.8\"\n",
" else ['`int`', '`Optional[str]`', '`Dict[str, int]`', 'Any']\n",
")\n",
"for param in s.parameters.values():\n",
" actual.append(_get_param_annotation(param))\n",
" \n",
Expand Down Expand Up @@ -2166,7 +2171,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"['/tmp/tmpobk6jmt2', '/work/fastkafka/nbs', '/usr/lib/python311.zip', '/usr/lib/python3.11', '/usr/lib/python3.11/lib-dynload', '', '/home/harish/.local/lib/python3.11/site-packages', '/work/fastkafka', '/usr/local/lib/python3.11/dist-packages', '/usr/lib/python3/dist-packages']\n"
"['/tmp/tmprjejkk03', '/work/fastkafka/nbs', '/usr/lib/python311.zip', '/usr/lib/python3.11', '/usr/lib/python3.11/lib-dynload', '', '/home/harish/.local/lib/python3.11/site-packages', '/work/fastkafka', '/usr/local/lib/python3.11/dist-packages', '/usr/lib/python3/dist-packages']\n"
]
}
],
Expand Down Expand Up @@ -3456,7 +3461,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"[Path('/tmp/tmp2y6mn0im/docusaurus/docs/file.md'), Path('/tmp/tmp2y6mn0im/docusaurus/docs/api/file.md'), Path('/tmp/tmp2y6mn0im/docusaurus/docs/api/fastKafka/file.md'), Path('/tmp/tmp2y6mn0im/docusaurus/docs/blog/file.md')]\n"
"[Path('/tmp/tmpjmu3oe0v/docusaurus/docs/file.md'), Path('/tmp/tmpjmu3oe0v/docusaurus/docs/api/file.md'), Path('/tmp/tmpjmu3oe0v/docusaurus/docs/api/fastKafka/file.md'), Path('/tmp/tmpjmu3oe0v/docusaurus/docs/blog/file.md')]\n"
]
}
],
Expand Down Expand Up @@ -4258,14 +4263,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
"## mypackage_551.mymodule.FixtureClass {#mypackage_551.mymodule.FixtureClass}\n",
"## mypackage_680.mymodule.FixtureClass {#mypackage_680.mymodule.FixtureClass}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/0.1.0/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
"\n",
"Fixture documentation\n",
"\n",
"### __init__ {#mypackage_551.mymodule.FixtureClass.init}\n",
"### __init__ {#mypackage_680.mymodule.FixtureClass.init}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/0.1.0/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
Expand All @@ -4277,7 +4282,7 @@
"\n",
"__init__ documentation url=HttpUrl(\" https://www.google.co.uk \", )\n",
"\n",
"### abstract_method {#mypackage_551.mymodule.FixtureClass.abstract_method}\n",
"### abstract_method {#mypackage_680.mymodule.FixtureClass.abstract_method}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/0.1.0/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
Expand All @@ -4290,7 +4295,7 @@
"\n",
"abstract_method documentation\n",
"\n",
"### class_method {#mypackage_551.mymodule.FixtureClass.class_method}\n",
"### class_method {#mypackage_680.mymodule.FixtureClass.class_method}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/0.1.0/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
Expand All @@ -4301,7 +4306,7 @@
"\n",
"class_method documentation\n",
"\n",
"### instance_method {#mypackage_551.mymodule.FixtureClass.instance_method}\n",
"### instance_method {#mypackage_680.mymodule.FixtureClass.instance_method}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/0.1.0/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
Expand All @@ -4313,7 +4318,7 @@
"\n",
"instance_method documentation\n",
"\n",
"### patched_method_in_same_file {#mypackage_551.mymodule.FixtureClass.patched_method_in_same_file}\n",
"### patched_method_in_same_file {#mypackage_680.mymodule.FixtureClass.patched_method_in_same_file}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/0.1.0/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
Expand All @@ -4325,7 +4330,7 @@
"\n",
"I am a patched method in the same file\n",
"\n",
"### property_attribute {#mypackage_551.mymodule.FixtureClass.property_attribute}\n",
"### property_attribute {#mypackage_680.mymodule.FixtureClass.property_attribute}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/0.1.0/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
Expand All @@ -4338,7 +4343,7 @@
"\n",
"property_attribute documentation\n",
"\n",
"### static_method {#mypackage_551.mymodule.FixtureClass.static_method}\n",
"### static_method {#mypackage_680.mymodule.FixtureClass.static_method}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/0.1.0/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
Expand All @@ -4350,14 +4355,14 @@
"static_method documentation\n",
"\n",
"\n",
"## mypackage_646.mymodule.FixtureClass {#mypackage_646.mymodule.FixtureClass}\n",
"## mypackage_35.mymodule.FixtureClass {#mypackage_35.mymodule.FixtureClass}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/main/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
"\n",
"Fixture documentation\n",
"\n",
"### __init__ {#mypackage_646.mymodule.FixtureClass.init}\n",
"### __init__ {#mypackage_35.mymodule.FixtureClass.init}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/main/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
Expand All @@ -4369,7 +4374,7 @@
"\n",
"__init__ documentation url=HttpUrl(\" https://www.google.co.uk \", )\n",
"\n",
"### abstract_method {#mypackage_646.mymodule.FixtureClass.abstract_method}\n",
"### abstract_method {#mypackage_35.mymodule.FixtureClass.abstract_method}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/main/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
Expand All @@ -4382,7 +4387,7 @@
"\n",
"abstract_method documentation\n",
"\n",
"### class_method {#mypackage_646.mymodule.FixtureClass.class_method}\n",
"### class_method {#mypackage_35.mymodule.FixtureClass.class_method}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/main/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
Expand All @@ -4393,7 +4398,7 @@
"\n",
"class_method documentation\n",
"\n",
"### instance_method {#mypackage_646.mymodule.FixtureClass.instance_method}\n",
"### instance_method {#mypackage_35.mymodule.FixtureClass.instance_method}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/main/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
Expand All @@ -4405,7 +4410,7 @@
"\n",
"instance_method documentation\n",
"\n",
"### patched_method_in_same_file {#mypackage_646.mymodule.FixtureClass.patched_method_in_same_file}\n",
"### patched_method_in_same_file {#mypackage_35.mymodule.FixtureClass.patched_method_in_same_file}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/main/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
Expand All @@ -4417,7 +4422,7 @@
"\n",
"I am a patched method in the same file\n",
"\n",
"### property_attribute {#mypackage_646.mymodule.FixtureClass.property_attribute}\n",
"### property_attribute {#mypackage_35.mymodule.FixtureClass.property_attribute}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/main/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
Expand All @@ -4430,7 +4435,7 @@
"\n",
"property_attribute documentation\n",
"\n",
"### static_method {#mypackage_646.mymodule.FixtureClass.static_method}\n",
"### static_method {#mypackage_35.mymodule.FixtureClass.static_method}\n",
"\n",
"<a href=\"https://github.com/airtai/fastkafka/blob/main/fastkafka/_application/app.py#L171-L425\" class=\"link-to-source\" target=\"_blank\">View source</a>\n",
"\n",
Expand Down Expand Up @@ -5157,7 +5162,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Error deleting files from docusaurus/docs directory. Could not delete file: /tmp/tmpywwi7nsb/docusaurus/docs/t.txt - [Errno 2] No such file or directory: '/tmp/tmpywwi7nsb/docusaurus/docs/t.txt'\n"
"Error deleting files from docusaurus/docs directory. Could not delete file: /tmp/tmpu3bevckb/docusaurus/docs/t.txt - [Errno 2] No such file or directory: '/tmp/tmpu3bevckb/docusaurus/docs/t.txt'\n"
]
}
],
Expand Down Expand Up @@ -5238,7 +5243,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"[Path('/tmp/tmpa8xg4zdz/docusaurus/docs/CONTRIBUTING.md'), Path('/tmp/tmpa8xg4zdz/docusaurus/docs/LICENSE.md'), Path('/tmp/tmpa8xg4zdz/docusaurus/docs/index.md')]\n"
"[Path('/tmp/tmpx945na51/docusaurus/docs/CONTRIBUTING.md'), Path('/tmp/tmpx945na51/docusaurus/docs/LICENSE.md'), Path('/tmp/tmpx945na51/docusaurus/docs/index.md')]\n"
]
}
],
Expand Down Expand Up @@ -5382,7 +5387,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"/tmp/tmp3hpmutox\n"
"/tmp/tmpwf8d24da\n"
]
}
],
Expand Down

0 comments on commit ae6b18d

Please sign in to comment.