aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-10-16 18:23:23 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-10-16 18:38:09 +0200
commitfa2f913da41e5dbf33c3a6372372da8c53d519ee (patch)
treee070121cc8e59bd937f52445e5cd7854f0921aff
parenta43c49511ba01aea3713def375455af3f3c45396 (diff)
downloadreddit-nextcloud-importer-fa2f913da41e5dbf33c3a6372372da8c53d519ee.tar.gz
reddit-nextcloud-importer-fa2f913da41e5dbf33c3a6372372da8c53d519ee.tar.bz2
reddit-nextcloud-importer-fa2f913da41e5dbf33c3a6372372da8c53d519ee.zip
fix: fix testing
-rw-r--r--build.yml1
-rw-r--r--pyproject.toml5
-rw-r--r--pytest.ini3
-rw-r--r--reddit_nextcloud_importer/__init__.py3
-rw-r--r--test_uploader.py (renamed from test/test_uploader.py)2
5 files changed, 6 insertions, 8 deletions
diff --git a/build.yml b/build.yml
index 88e61a8..fd39c42 100644
--- a/build.yml
+++ b/build.yml
@@ -15,7 +15,6 @@ secrets:
environment:
deploy: builds@gabrielgio.me
target: artifacts.gabrielgio.me/reddit-nextcloud-importer/
- version: v0.1.1
tasks:
- archive: |
diff --git a/pyproject.toml b/pyproject.toml
index adde93c..38672a1 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,13 +1,14 @@
[tool.poetry]
name = "reddit-nextcloud-importer"
-version = "0.1.1"
+version = "0.1.2"
license = "Apache-2.0"
homepage = "https://git.sr.ht/~gabrielgio/reddit-nextcloud-importer"
repository = "https://git.sr.ht/~gabrielgio/reddit-nextcloud-importer"
description = "Reddit to Nextcloud importer"
authors = ["Gabriel Arakaki Giovanini <mail@gabielgio.me>"]
packages = [
- { include = "reddit_nextcloud_importer" }
+ { include = "reddit_nextcloud_importer" },
+ { include = "test_uploader.py" }
]
[tool.poetry.dependencies]
diff --git a/pytest.ini b/pytest.ini
deleted file mode 100644
index 20c6e5e..0000000
--- a/pytest.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[pytest]
-pythonpath = .
-testpaths = test
diff --git a/reddit_nextcloud_importer/__init__.py b/reddit_nextcloud_importer/__init__.py
index 6097ef4..c0d769c 100644
--- a/reddit_nextcloud_importer/__init__.py
+++ b/reddit_nextcloud_importer/__init__.py
@@ -1,6 +1,7 @@
import argparse
import logging
import os
+from typing import List
from time import sleep
import praw
@@ -92,7 +93,7 @@ def get_list_of_files(dirName):
return allFiles
-def download(url) -> [str]:
+def download(url) -> List[str]:
d = DownloadJob(url=url)
d.run()
basedir = d.pathfmt.basedirectory
diff --git a/test/test_uploader.py b/test_uploader.py
index 7fe2f44..0f652ca 100644
--- a/test/test_uploader.py
+++ b/test_uploader.py
@@ -1,6 +1,6 @@
import pytest
-from importer.uploader import create_folders
+from reddit_nextcloud_importer import create_folders
@pytest.fixture