scaffolding: add standard files, test for office sub-package
This commit is contained in:
parent
ac2a1062db
commit
9cc721f6cf
7 changed files with 71 additions and 0 deletions
7
CHANGES.txt
Normal file
7
CHANGES.txt
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Changelog
|
||||||
|
=========
|
||||||
|
|
||||||
|
3.0.1 (unreleased)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Package created (2025-08-19)
|
1
CONTRIBUTORS.txt
Normal file
1
CONTRIBUTORS.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
- Helmut Merz, Original Author
|
13
README.md
Normal file
13
README.md
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# py-scopes-ext
|
||||||
|
|
||||||
|
Extensions for the `py-scopes` package.
|
||||||
|
|
||||||
|
Sub-packages
|
||||||
|
: office: working with LibreOffice files
|
||||||
|
|
||||||
|
Status: implementation started
|
||||||
|
|
||||||
|
Project website: https://www.cyberconcepts.org
|
||||||
|
|
||||||
|
License: MIT, see LICENSE file
|
||||||
|
|
5
runtests.sh
Executable file
5
runtests.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
# runtests.sh
|
||||||
|
# run all unit / doc tests
|
||||||
|
|
||||||
|
zope-testrunner --test-path=. $*
|
||||||
|
|
1
scopes/office/tests/__init__.py
Normal file
1
scopes/office/tests/__init__.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# py-scopes-ext/office/tests
|
26
scopes/office/tests/config.py
Normal file
26
scopes/office/tests/config.py
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# py-scopes-ext/scopes/office/tests/config.py
|
||||||
|
|
||||||
|
import logging
|
||||||
|
from os import getenv
|
||||||
|
import sys
|
||||||
|
|
||||||
|
log_file = 'scopes/office/tests/log/scopes-test.log'
|
||||||
|
log_level = logging.INFO
|
||||||
|
log_format = '%(asctime)s %(levelname)s %(name)s %(message)s'
|
||||||
|
log_dateformat = '%Y-%m-%dT%H:%M:%S'
|
||||||
|
|
||||||
|
def setup_logging():
|
||||||
|
hdlr = logging.getLogger().handlers[-1]
|
||||||
|
logging.getLogger().removeHandler(hdlr) # remove NullHandler added by testrunner
|
||||||
|
logging.basicConfig(filename=log_file, level=log_level,
|
||||||
|
format=log_format, datefmt=log_dateformat)
|
||||||
|
|
||||||
|
setup_logging()
|
||||||
|
|
||||||
|
# SQLite
|
||||||
|
dbengine = 'sqlite'
|
||||||
|
dbname = 'scopes/office/tests/var/test.db'
|
||||||
|
dbuser = None
|
||||||
|
dbpassword = None
|
||||||
|
dbschema = None
|
||||||
|
|
18
scopes/office/tests/test_office.py
Normal file
18
scopes/office/tests/test_office.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# scopes.office.tests.test_office
|
||||||
|
|
||||||
|
"""Tests for the 'scopes.office' package."""
|
||||||
|
|
||||||
|
import os, sys
|
||||||
|
sys.path = [os.path.dirname(__file__)] + sys.path
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
from scopes.storage.common import StorageFactory
|
||||||
|
import config
|
||||||
|
config.storageFactory = StorageFactory(config)
|
||||||
|
|
||||||
|
|
||||||
|
class Test(unittest.TestCase):
|
||||||
|
|
||||||
|
def test_001_basic(self):
|
||||||
|
pass
|
Loading…
Add table
Reference in a new issue