Skip to content

Commit

Permalink
chore: move tests to /tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yzqzss committed Oct 5, 2024
1 parent 4129537 commit 678573f
Show file tree
Hide file tree
Showing 18 changed files with 6 additions and 10 deletions.
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ repository = "https://github.com/saveweb/wikiteam3"

[tool.pdm]
[tool.pdm.build]
includes = ["wikiteam3/**/*"]
excludes = ["wikiteam3/dumpgenerator/test/*"]
excludes = []
[tool.pdm.dev-dependencies]
dev = [
"pytest<9.0.0,>=8.2.2",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import os
from pathlib import Path
import re
from urllib.parse import unquote
from typing import Dict

import requests
import pytest

from wikiteam3.dumpgenerator import DUMPER_ROOT_PATH
from wikiteam3.dumpgenerator.dump.image.html_regexs import REGEX_CANDIDATES
from wikiteam3.utils.util import undo_HTML_entities

ONLINE = False

HTML_DIR = DUMPER_ROOT_PATH / "test/data/html_regexs"
HTML_DIR = Path(__file__).parent / "data/html_regexs"
os.makedirs(HTML_DIR, exist_ok=True)

def prepare_raws_from_urls(urls: Dict[str, str]):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import pytest
import requests

from wikiteam3.dumpgenerator.test.test_config import get_config
from wikiteam3.dumpgenerator.dump.misc.site_info import save_siteinfo

from .site_info import save_siteinfo
from tests.test_config import get_config

def test_mediawiki_1_16():
pytest.skip("Temporarily down")
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def _new_config_from_parameter(params):
pass

def get_config(mediawiki_ver, api=True):
assert api == True
assert api is True
if mediawiki_ver == '1.16.5':
return _new_config_from_parameter([
"--api", "http://group0.mediawiki.demo.save-web.org/mediawiki-1.16.5/api.php",
Expand Down
3 changes: 0 additions & 3 deletions wikiteam3/dumpgenerator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
from pathlib import Path
from wikiteam3.dumpgenerator.dump import DumpGenerator

DUMPER_ROOT_PATH = Path(__file__).parent

def main():
DumpGenerator()

0 comments on commit 678573f

Please sign in to comment.