Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1570343

Browse filesBrowse files
committed
feat: fixed nox file conflict
2 parents a816ab9 + 00e2ee8 commit 1570343
Copy full SHA for 1570343

File tree

Expand file treeCollapse file tree

4 files changed

+10
-64
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+10
-64
lines changed

‎docs/conf.py

Copy file name to clipboardExpand all lines: docs/conf.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
import sys
2020
import os
21+
22+
from version import __version__
2123
import shlex
2224

2325
# If extensions (or modules to document with autodoc) are in another directory,
@@ -29,8 +31,6 @@
2931
# See also: https://github.com/docascode/sphinx-docfx-yaml/issues/85
3032
sys.path.insert(0, os.path.abspath("."))
3133

32-
__version__ = ""
33-
3434
# -- General configuration ------------------------------------------------
3535

3636
# If your documentation needs a minimal Sphinx version, state it here.
@@ -352,7 +352,7 @@
352352
# Example configuration for intersphinx: refer to the Python standard library.
353353
intersphinx_mapping = {
354354
"python": ("https://python.readthedocs.org/en/latest/", None),
355-
"google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
355+
"google-auth": ("https://google-auth.readthedocs.io/en/stable/", None),
356356
"google.api_core": (
357357
"https://googleapis.dev/python/google-api-core/latest/",
358358
None,

‎noxfile.py

Copy file name to clipboardExpand all lines: noxfile.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def default(session):
7979
"--cov-append",
8080
"--cov-config=.coveragerc",
8181
"--cov-report=",
82-
"--cov-fail-under=25",
82+
"--cov-fail-under=20",
8383
os.path.join("tests", "unit"),
8484
*session.posargs
8585
)
@@ -131,12 +131,12 @@ def docs(session):
131131
def docfx(session):
132132
"""Build the docfx yaml files for this library."""
133133

134-
session.install("-e", ".")
134+
session.install("-e", ".[tracing]")
135135
session.install(
136136
"sphinx",
137137
"alabaster",
138138
"recommonmark",
139-
"sphinx-docfx-yaml",
139+
"gcp-sphinx-docfx-yaml",
140140
"django==2.2",
141141
)
142142

‎tests/unit/django_spanner/test_base.py

Copy file name to clipboardExpand all lines: tests/unit/django_spanner/test_base.py
+4-14Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,15 @@
66

77
import sys
88
import unittest
9-
import os
109

1110
from mock_import import mock_import
1211
from unittest import mock
1312

1413

1514
@mock_import()
16-
@unittest.skipIf(
17-
sys.version_info < (3, 6), reason="Skipping Python versions <= 3.5"
18-
)
15+
@unittest.skipIf(sys.version_info < (3, 6), reason="Skipping Python 3.5")
1916
class TestBase(unittest.TestCase):
20-
PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"]
17+
PROJECT = "project"
2118
INSTANCE_ID = "instance_id"
2219
DATABASE_ID = "database_id"
2320
USER_AGENT = "django_spanner/2.2.0a1"
@@ -67,10 +64,10 @@ def test_get_connection_params(self):
6764
def test_get_new_connection(self):
6865
db_wrapper = self._make_one(self.settings_dict)
6966
db_wrapper.Database = mock_database = mock.MagicMock()
70-
mock_database.connect = mock_connection = mock.MagicMock()
67+
mock_database.connect = mock_connect = mock.MagicMock()
7168
conn_params = {"test_param": "dummy"}
7269
db_wrapper.get_new_connection(conn_params)
73-
mock_connection.assert_called_once_with(**conn_params)
70+
mock_connect.assert_called_once_with(**conn_params)
7471

7572
def test_init_connection_state(self):
7673
db_wrapper = self._make_one(self.settings_dict)
@@ -109,10 +106,3 @@ def test_is_usable(self):
109106

110107
mock_connection.cursor = mock.MagicMock(side_effect=Error)
111108
self.assertFalse(db_wrapper.is_usable())
112-
113-
def test__start_transaction_under_autocommit(self):
114-
db_wrapper = self._make_one(self.settings_dict)
115-
db_wrapper.connection = mock_connection = mock.MagicMock()
116-
mock_connection.cursor = mock_cursor = mock.MagicMock()
117-
db_wrapper._start_transaction_under_autocommit()
118-
mock_cursor.assert_called_once_with()

‎tests/unit/django_spanner/test_client.py

Copy file name to clipboardExpand all lines: tests/unit/django_spanner/test_client.py
-44Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.