-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #197 from jitseniesen/spyder6
Use Spyder's new PythonpathManager plugin
- Loading branch information
Showing
10 changed files
with
277 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env python | ||
# | ||
# Copyright (c) Spyder Project Contributors | ||
# Licensed under the terms of the MIT License | ||
# (see LICENSE.txt for details) | ||
|
||
"""Script to generate requirements/without-spyder.txt""" | ||
|
||
import re | ||
|
||
with open('requirements/conda.txt') as infile: | ||
with open('requirements/without-spyder.txt', 'w') as outfile: | ||
for line in infile: | ||
package_name = re.match('[-a-z0-9_]*', line).group(0) | ||
if package_name != 'spyder': | ||
outfile.write(line) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright © Spyder Project Contributors | ||
# Licensed under the terms of the MIT License | ||
# | ||
|
||
"""Configuration file for Pytest.""" | ||
|
||
# Standard library imports | ||
import os | ||
|
||
# To activate/deactivate certain things in Spyder when running tests. | ||
# NOTE: Please leave this before any other import here!! | ||
os.environ['SPYDER_PYTEST'] = 'True' | ||
|
||
# Third-party imports | ||
import pytest | ||
|
||
|
||
@pytest.fixture(autouse=True) | ||
def reset_conf_before_test(): | ||
from spyder.config.manager import CONF | ||
CONF.reset_to_defaults(notification=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
lxml | ||
spyder>=5.3.1,<6 | ||
spyder>=6.0.0.dev0,<7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,4 @@ flaky | |
nose | ||
pytest>=5 | ||
pytest-cov | ||
pytest-mock | ||
pytest-qt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright © Spyder Project Contributors | ||
# Licensed under the terms of the MIT License | ||
# (see LICENSE.txt for details) | ||
""" | ||
Configuration file for Pytest. | ||
This contains the necessary definitions to make the main_window fixture | ||
available for integration tests. | ||
""" | ||
|
||
# Third-party imports | ||
from qtpy.QtWidgets import QApplication | ||
import pytest | ||
|
||
# QtWebEngineWidgets must be imported | ||
# before a QCoreApplication instance is created | ||
from qtpy import QtWebEngineWidgets # noqa | ||
|
||
# Spyder imports | ||
from spyder.app import start | ||
from spyder.config.manager import CONF | ||
|
||
|
||
@pytest.fixture | ||
def main_window(request): | ||
"""Main Window fixture""" | ||
|
||
# Don't show tours message | ||
CONF.set('tours', 'show_tour_message', False) | ||
QApplication.processEvents() | ||
|
||
from spyder.api.plugin_registration.registry import PLUGIN_REGISTRY | ||
PLUGIN_REGISTRY.reset() | ||
|
||
# Start the window | ||
window = start.main() | ||
QApplication.processEvents() | ||
|
||
yield window | ||
|
||
# Close main window | ||
window.close() | ||
CONF.reset_to_defaults(notification=False) |
Oops, something went wrong.