From 4143cd84fe2c7d72ba2f8f17bdebb44ec51220ab Mon Sep 17 00:00:00 2001
From: Leszek Szymczak <leszeks@e-science.pl>
Date: Mon, 3 Aug 2020 12:38:54 +0000
Subject: [PATCH] Adding tests

---
 .gitlab-ci.yml   | 10 +++++++++-
 plwn/download.py |  2 +-
 setup.py         |  2 +-
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 03ddfb7..c79bd6b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,6 +9,7 @@ cache:
 
 stages:
  - check_style
+ - tests
  - push_wheel
 
 pep8:
@@ -21,6 +22,14 @@ docstyle:
   script:
    - tox -v -e docstyle
 
+test:
+  stage: tests
+  before_script:
+    - apt-get install -y language-pack-pl-base
+    - dpkg-reconfigure locales
+  script:
+    - python setup.py test
+
 push_wheel:
   before_script:
    - pip install twine
@@ -34,4 +43,3 @@ push_wheel:
      --repository-url https://pypi.clarin-pl.eu/
      -u $PIPY_USER -p $PIPY_PASS dist/plwn_api*.whl
 
-
diff --git a/plwn/download.py b/plwn/download.py
index e38526c..f564764 100644
--- a/plwn/download.py
+++ b/plwn/download.py
@@ -1,11 +1,11 @@
 """Implementation of download method."""
-import configparser
 import os
 import xml.etree.ElementTree as ET
 import re
 
 import requests
 from six.moves.urllib.request import urlopen
+from six.moves import configparser
 
 
 config = configparser.ConfigParser()
diff --git a/setup.py b/setup.py
index fad4287..32793b9 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@ import os
 ENVNAME_DIST_NODEFAULT = 'PLWN_API_DIST_NO_DEFAULT_STORAGE'
 
 setup_args = dict(
-    name='PLWN_API',
+    name='plwn_api',
     version='0.24',
     license='LGPL-3.0+',
     description='Python API to access plWordNet lexicon',
-- 
GitLab