File: 0001-Avoid-relative-imports-in-testsuite.patch

package info (click to toggle)
python-testbook 0.4.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 408 kB
  • sloc: python: 1,045; makefile: 11
file content (122 lines) | stat: -rw-r--r-- 3,942 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
From: Roland Mas <roland.mas@entierement.net>
Date: Tue, 10 Dec 2024 12:14:29 +0100
Subject: Avoid relative imports in testsuite

---
 testbook/tests/test_client.py      | 6 +++---
 testbook/tests/test_datamodel.py   | 2 +-
 testbook/tests/test_execute.py     | 4 ++--
 testbook/tests/test_inject.py      | 2 +-
 testbook/tests/test_patch.py       | 4 ++--
 testbook/tests/test_reference.py   | 4 ++--
 testbook/tests/test_testbook.py    | 2 +-
 testbook/tests/test_translators.py | 2 +-
 8 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/testbook/tests/test_client.py b/testbook/tests/test_client.py
index edb1ed9..1d4350f 100644
--- a/testbook/tests/test_client.py
+++ b/testbook/tests/test_client.py
@@ -1,9 +1,9 @@
 import pytest
 from textwrap import dedent
 
-from ..testbook import testbook
-from ..client import TestbookNotebookClient
-from ..exceptions import TestbookCellTagNotFoundError, TestbookExecuteResultNotFoundError
+from testbook.testbook import testbook
+from testbook.client import TestbookNotebookClient
+from testbook.exceptions import TestbookCellTagNotFoundError, TestbookExecuteResultNotFoundError
 
 
 @pytest.fixture(scope='module')
diff --git a/testbook/tests/test_datamodel.py b/testbook/tests/test_datamodel.py
index 29ecc14..11acd88 100644
--- a/testbook/tests/test_datamodel.py
+++ b/testbook/tests/test_datamodel.py
@@ -1,6 +1,6 @@
 import pytest
 
-from ..testbook import testbook
+from testbook.testbook import testbook
 
 
 @pytest.fixture(scope='module')
diff --git a/testbook/tests/test_execute.py b/testbook/tests/test_execute.py
index 6c96f00..8097487 100644
--- a/testbook/tests/test_execute.py
+++ b/testbook/tests/test_execute.py
@@ -1,7 +1,7 @@
 import pytest
 
-from ..testbook import testbook
-from ..exceptions import TestbookRuntimeError, TestbookError
+from testbook.testbook import testbook
+from testbook.exceptions import TestbookRuntimeError, TestbookError
 
 
 @pytest.fixture(scope='module')
diff --git a/testbook/tests/test_inject.py b/testbook/tests/test_inject.py
index 3228316..fe266a4 100644
--- a/testbook/tests/test_inject.py
+++ b/testbook/tests/test_inject.py
@@ -1,6 +1,6 @@
 import pytest
 
-from ..testbook import testbook
+from testbook.testbook import testbook
 
 
 @pytest.fixture(scope='module')
diff --git a/testbook/tests/test_patch.py b/testbook/tests/test_patch.py
index 6865877..d0e71b8 100644
--- a/testbook/tests/test_patch.py
+++ b/testbook/tests/test_patch.py
@@ -1,5 +1,5 @@
-from ..testbook import testbook
-from ..exceptions import TestbookRuntimeError
+from testbook.testbook import testbook
+from testbook.exceptions import TestbookRuntimeError
 
 import pytest
 
diff --git a/testbook/tests/test_reference.py b/testbook/tests/test_reference.py
index c766aa2..94c9ae3 100644
--- a/testbook/tests/test_reference.py
+++ b/testbook/tests/test_reference.py
@@ -1,7 +1,7 @@
 import pytest
 
-from ..testbook import testbook
-from ..exceptions import TestbookAttributeError, TestbookSerializeError
+from testbook.testbook import testbook
+from testbook.exceptions import TestbookAttributeError, TestbookSerializeError
 
 
 @pytest.fixture(scope='module')
diff --git a/testbook/tests/test_testbook.py b/testbook/tests/test_testbook.py
index a05ec67..b947de7 100644
--- a/testbook/tests/test_testbook.py
+++ b/testbook/tests/test_testbook.py
@@ -2,7 +2,7 @@ import nbformat
 
 import pytest
 
-from ..testbook import testbook
+from testbook.testbook import testbook
 
 
 @testbook('testbook/tests/resources/inject.ipynb', execute=True)
diff --git a/testbook/tests/test_translators.py b/testbook/tests/test_translators.py
index e21608a..696fc8d 100644
--- a/testbook/tests/test_translators.py
+++ b/testbook/tests/test_translators.py
@@ -1,7 +1,7 @@
 """Sourced from https://github.com/nteract/papermill/blob/master/papermill/tests/test_translators.py"""
 import pytest
 
-from .. import translators
+from testbook import translators
 
 
 class Foo: